def test_getvalue_pathlist(self): |
tmpdir = self.tmpdir |
somepath = tmpdir.join("x", "y", "z") |
p = tmpdir.join("conftest.py") |
p.write("pathlist = ['.', %r]" % str(somepath)) |
config = py.test.config._reparse([p]) |
assert config.getvalue_pathlist('notexist') is None |
pl = config.getvalue_pathlist('pathlist') |
-> print pl |
assert len(pl) == 2 |
assert pl[0] == tmpdir |
assert pl[1] == somepath |
|
config.option.mypathlist = [py.path.local()] |
pl = config.getvalue_pathlist('mypathlist') |
assert pl == [py.path.local()] |