Skip to content

Commit

Permalink
Add hint of Issue pytest-dev#478 to error text
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan Betts authored and Duncan Betts committed Nov 26, 2016
1 parent 33796c8 commit c9cad79
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions _pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,9 @@ def _parsearg(self, arg):
path = self.config.invocation_dir.join(relpath, abs=True)
if not path.check():
if self.config.option.pyargs:
msg = "file or package not found: "
raise pytest.UsageError("file or package not found: " + arg + " (missing __init__.py?)")
else:
msg = "file not found: "
raise pytest.UsageError(msg + arg)
raise pytest.UsageError("file not found: " + arg)
parts[0] = path
return parts

Expand Down

0 comments on commit c9cad79

Please sign in to comment.