fixture Questions
5
I am not talking about the Parameterizing a fixture feature that allows a fixture to be run multiple times for a hard-coded set of parameters.
I have a LOT of tests that follow a pattern like:
ht...
7
Solved
I want to create with Fixture a list of N objects.
I know I can do it with:
List<Person> persons = new List<Person>();
for (int i = 0; i < numberOfPersons; i++)
{
Person person =...
4
Solved
I'm learning pytest and I lint my code with pylint.
But pylint still complaints about:
W0621: Redefining name %r from outer scope (line %s)
for the following example from pytest:
# test_wallet.py...
1
I have a fixture of "User" objects (just the default Django auth ones), and am trying to create a fixture of "Profile" objects. Each profile has a one-to-one relation to a user object, and defines ...
4
Solved
In the py.test docs it describes declaring factory methods as fixtures, like-so:
@pytest.fixture
def make_foo():
def __make_foo(name):
foo = Foo()
foo.name = name
return foo
return __make_foo...
Tequila asked 2/8, 2018 at 23:15
1
The NUnit-console 2.6.3 sometimes prints out the following error message instead of running tests. Here is excerpt from my Jenkins test build logs:
00:05:02.982 Process 'nunit-console-x86' [PID 36...
Pleasing asked 1/12, 2014 at 10:6
2
I am trying to use a pytest fixture (scope=module) in a class skipif decorator, but I am getting an error saying the fixture is not defined. Is this possible?
conftest.py has a fixture with module...
4
Solved
I need to init some variables, which are "global" inside a BOOST_AUTO_TEST_SUITE
so their constructors will be called when the suite starts and their destructors will be called right after the last...
Jamnes asked 14/12, 2011 at 19:10
1
It is possible to parametrize test functions from command-line arguments.
It is possible to have a fixture scoped to a class.
I want to combine those two things, so that each class receives paramet...
2
Solved
I am using Rails and my YAML fixtures are corrupted and unusable. I would like to regenerate the YAML fixtures based on the development database.
I am not trying to take all the DB data and turn i...
Astound asked 20/8, 2015 at 20:40
1
Solved
I am learning codeception and I wonder what is the difference between stubs and fixtures.
Both help me to load well-defined data and kepp tessts simple.
But when do I use
\Codeception\Util\Stub a...
Guerin asked 27/1, 2017 at 17:29
2
Solved
Sample code from pytest.org, is it possible to load params from a json file?
# content of conftest.py
import pytest
import smtplib
@pytest.fixture(scope="module",
params=["smtp.gmail.com", "mai...
4
The django projet I'm working on has a ton of initial_data fixture data. It seems by default the only way to have data load automatically is to have a file in your app folder called fixtures, and t...
4
Solved
My DoctrineFixturesBundle is installed and I can load fixture trough the command-line but , how can I load fixtures from my functional test ?
Gilbertina asked 13/6, 2013 at 16:2
7
Solved
Does anyone knows how to load initial data for auth.User using sql fixtures?
For my models, I just got have a < modelname >.sql file in a folder named sql that syncdb does it's job beautifully. ...
2
Solved
I need to create some fixtures for django test. Does anyone know of a shortcut that lets me get x number of rows from every table in database and serialize it?
Background:
I have Multiple tables w...
Mum asked 8/4, 2011 at 18:37
3
Solved
I created an app in a Django project. For testing purpose, I would like to create fixture files. I found that I can dump my database in order to create fixture automatically if it already has data....
1
Solved
I'm using fixture to test a Pylons app, but I stumbled upon a problem.
Let's say I have such data set:
class CompanyData(DataSet):
class test_company:
company_full_name = u'Firma Tęst'
compan...
Slosh asked 15/1, 2011 at 16:14
1
Solved
I have a simple fixture.yml file:
label:
body: "<%= variable %>"
The issue is that the ERB code is parsed as part of loading the fixture, whereas I actually want the body to be literally ...
Aftmost asked 23/2, 2010 at 22:58
2
I can easily fill the field of a FileField or ImageField in a Django fixture with a file name, but that file doesn't exist and when I try to test my application it fails because that file doesn't e...
1
© 2022 - 2024 — McMap. All rights reserved.