[svn r38106] making tests independent of --dist implications
--HG-- branch : trunk
This commit is contained in:
parent
8258b40fd6
commit
d791086561
|
@ -271,7 +271,9 @@ def test_custom_NONpython_collection_from_conftest():
|
|||
assert len(l) == 1
|
||||
|
||||
def test_order_of_execution_generator_same_codeline():
|
||||
skipboxed()
|
||||
o = tmpdir.ensure('genorder1', dir=1)
|
||||
o.join("test_order1.py").write(py.code.Source("""
|
||||
def test_generative_order_of_execution():
|
||||
test_list = []
|
||||
expected_list = range(6)
|
||||
|
||||
|
@ -286,10 +288,17 @@ def test_order_of_execution_generator_same_codeline():
|
|||
for i in expected_list:
|
||||
yield list_append, i
|
||||
yield assert_order_of_execution
|
||||
|
||||
"""))
|
||||
config = py.test.config._reparse([o])
|
||||
session = config.initsession()
|
||||
session.main()
|
||||
l = session.getitemoutcomepairs(Passed)
|
||||
assert len(l) == 7
|
||||
|
||||
def test_order_of_execution_generator_different_codeline():
|
||||
skipboxed()
|
||||
o = tmpdir.ensure('genorder2', dir=2)
|
||||
o.join("test_genorder2.py").write(py.code.Source("""
|
||||
def test_generative_tests_different_codeline():
|
||||
test_list = []
|
||||
expected_list = range(3)
|
||||
|
||||
|
@ -311,6 +320,13 @@ def test_order_of_execution_generator_different_codeline():
|
|||
yield list_append_1
|
||||
yield list_append_2
|
||||
yield assert_order_of_execution
|
||||
"""))
|
||||
config = py.test.config._reparse([o])
|
||||
session = config.initsession()
|
||||
session.main()
|
||||
l = session.getitemoutcomepairs(Passed)
|
||||
assert len(l) == 4
|
||||
|
||||
|
||||
|
||||
def test_documentation_virtual_collector_interaction():
|
||||
|
|
Loading…
Reference in New Issue