Paths after normal options are now properly used to discover rootdir and ini files

Fix #949
This commit is contained in:
Bruno Oliveira
2015-08-25 22:08:05 -03:00
parent b25e41e348
commit 42b43a7d7b
4 changed files with 38 additions and 5 deletions

View File

@@ -105,8 +105,10 @@ class TestParser:
def test_parse_known_args(self, parser):
parser.parse_known_args([py.path.local()])
parser.addoption("--hello", action="store_true")
ns = parser.parse_known_args(["x", "--y", "--hello", "this"])
ns, extra_args = parser.parse_known_args(["x", "--y", "--hello", "this"])
assert ns.hello
assert ns.file_or_dir == ['x']
assert extra_args == ['--y', 'this']
def test_parse_will_set_default(self, parser):
parser.addoption("--hello", dest="hello", default="x", action="store")