[svn r38103] Hum. This test was just broken. Fix it and add additional checks.
--HG-- branch : trunk
This commit is contained in:
parent
c5df4c335c
commit
5b188f1167
|
@ -242,7 +242,6 @@ class TestSessionAndOptions:
|
||||||
assert session.config is config
|
assert session.config is config
|
||||||
|
|
||||||
def test_boxed_option_including_implied_from_conftest(self):
|
def test_boxed_option_including_implied_from_conftest(self):
|
||||||
skipboxed()
|
|
||||||
self.tmpdir.join("conftest.py").write("dist_hosts=[]")
|
self.tmpdir.join("conftest.py").write("dist_hosts=[]")
|
||||||
tmpdir = self.tmpdir.ensure("subdir", dir=1)
|
tmpdir = self.tmpdir.ensure("subdir", dir=1)
|
||||||
config = py.test.config._reparse([tmpdir])
|
config = py.test.config._reparse([tmpdir])
|
||||||
|
@ -250,7 +249,7 @@ class TestSessionAndOptions:
|
||||||
assert not config.option.boxed
|
assert not config.option.boxed
|
||||||
config = py.test.config._reparse(['--dist', tmpdir])
|
config = py.test.config._reparse(['--dist', tmpdir])
|
||||||
config.initsession()
|
config.initsession()
|
||||||
assert not config.option.boxed
|
assert config.option.boxed
|
||||||
|
|
||||||
tmpdir.join("conftest.py").write(py.code.Source("""
|
tmpdir.join("conftest.py").write(py.code.Source("""
|
||||||
dist_hosts = []
|
dist_hosts = []
|
||||||
|
@ -266,6 +265,12 @@ class TestSessionAndOptions:
|
||||||
assert config.option.boxed
|
assert config.option.boxed
|
||||||
config.initsession()
|
config.initsession()
|
||||||
assert config.option.boxed
|
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):
|
def test_getvalue_pathlist(self):
|
||||||
tmpdir = self.tmpdir
|
tmpdir = self.tmpdir
|
||||||
|
|
Loading…
Reference in New Issue