correctly handle zero length cmdline arguments
This commit is contained in:
parent
3bd3ba133f
commit
f2512017ea
|
@ -1,6 +1,7 @@
|
|||
Changes between 2.1.2 and [next version]
|
||||
----------------------------------------
|
||||
|
||||
- correctly handle zero length arguments (a la pytest '')
|
||||
- fix issue67 / junitxml now contains correct test durations, thanks ronny
|
||||
- fix issue75 / skipping test failure on jython
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@ class Config(object):
|
|||
|
||||
|
||||
def getcfg(args, inibasenames):
|
||||
args = [x for x in args if str(x)[0] != "-"]
|
||||
args = [x for x in args if not str(x).startswith("-")]
|
||||
if not args:
|
||||
args = [py.path.local()]
|
||||
for arg in args:
|
||||
|
|
|
@ -16,6 +16,9 @@ class TestParseIni:
|
|||
config._preparse([sub])
|
||||
assert config.inicfg['name'] == 'value'
|
||||
|
||||
def test_getcfg_empty_path(self, tmpdir):
|
||||
cfg = getcfg([''], ['setup.cfg']) #happens on py.test ""
|
||||
|
||||
def test_append_parse_args(self, tmpdir):
|
||||
tmpdir.join("setup.cfg").write(py.code.Source("""
|
||||
[pytest]
|
||||
|
|
Loading…
Reference in New Issue