Skip to content

Commit

Permalink
Fix abbreviated args in selftests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Jun 24, 2019
1 parent 0676236 commit ae3736f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion testing/acceptance_test.py
Expand Up @@ -984,7 +984,7 @@ def test_zipimport_hook(testdir, tmpdir):
"app/foo.py": """
import pytest
def main():
pytest.main(['--pyarg', 'foo'])
pytest.main(['--pyargs', 'foo'])
"""
}
)
Expand Down
2 changes: 1 addition & 1 deletion testing/test_capture.py
Expand Up @@ -735,7 +735,7 @@ def test_func():
assert 0
"""
)
result = testdir.runpytest("--cap=fd")
result = testdir.runpytest("--capture=fd")
result.stdout.fnmatch_lines(
"""
*def test_func*
Expand Down
6 changes: 2 additions & 4 deletions testing/test_parseopt.py
Expand Up @@ -239,10 +239,8 @@ def test_drop_short_0(self, parser):
parser.addoption("--funcarg", "--func-arg", action="store_true")
parser.addoption("--abc-def", "--abc-def", action="store_true")
parser.addoption("--klm-hij", action="store_true")
args = parser.parse(["--funcarg", "--k"])
assert args.funcarg is True
assert args.abc_def is False
assert args.klm_hij is True
with pytest.raises(UsageError):
parser.parse(["--funcarg", "--k"])

def test_drop_short_2(self, parser):
parser.addoption("--func-arg", "--doit", action="store_true")
Expand Down
2 changes: 1 addition & 1 deletion testing/test_pastebin.py
Expand Up @@ -21,7 +21,7 @@ def test_skip():
pytest.skip("")
"""
)
reprec = testdir.inline_run(testpath, "--paste=failed")
reprec = testdir.inline_run(testpath, "--pastebin=failed")
assert len(pastebinlist) == 1
s = pastebinlist[0]
assert s.find("def test_fail") != -1
Expand Down

0 comments on commit ae3736f

Please sign in to comment.