def test_siblingconftest_fails_maybe(): |
from py.__.test import config |
cfg = config.Config() |
o = py.test.ensuretemp('siblingconftest') |
o.ensure("__init__.py") |
o.ensure("sister1", "__init__.py") |
o.ensure("sister1", "conftest.py").write(py.code.Source(""" |
x = 2 |
""")) |
|
o.ensure("sister2", "__init__.py") |
o.ensure("sister2", "conftest.py").write(py.code.Source(""" |
raise SyntaxError |
""")) |
|
assert cfg.getvalue(path=o.join('sister1'), name='x') == 2 |
-> old = o.chdir() |
try: |
pytestpath = py.magic.autopath().dirpath().dirpath().dirpath().join( |
'bin/py.test') |
print py.process.cmdexec('python "%s" sister1' % (pytestpath,)) |
o.join('sister1').chdir() |
print py.process.cmdexec('python "%s"' % (pytestpath,)) |
finally: |
old.chdir() |