[svn r38103] Hum. This test was just broken. Fix it and add additional checks.

--HG--
branch : trunk
This commit is contained in:
fijal 2007-02-07 20:02:21 +01:00
parent c5df4c335c
commit 5b188f1167
1 changed files with 8 additions and 3 deletions

View File

@ -242,7 +242,6 @@ class TestSessionAndOptions:
assert session.config is config
def test_boxed_option_including_implied_from_conftest(self):
skipboxed()
self.tmpdir.join("conftest.py").write("dist_hosts=[]")
tmpdir = self.tmpdir.ensure("subdir", dir=1)
config = py.test.config._reparse([tmpdir])
@ -250,7 +249,7 @@ class TestSessionAndOptions:
assert not config.option.boxed
config = py.test.config._reparse(['--dist', tmpdir])
config.initsession()
assert not config.option.boxed
assert config.option.boxed
tmpdir.join("conftest.py").write(py.code.Source("""
dist_hosts = []
@ -266,6 +265,12 @@ class TestSessionAndOptions:
assert config.option.boxed
config.initsession()
assert config.option.boxed
config = py.test.config._reparse([tmpdir, '-d'])
assert not config.option.boxed
config.initsession()
assert config.option.boxed
config = py.test.config._reparse([tmpdir, '-d', '-s'])
py.test.raises(SystemExit, "config.initsession()")
def test_getvalue_pathlist(self):
tmpdir = self.tmpdir