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 committed Nov 24, 2016
1 parent 38f7562 commit ba3c1d2
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 ba3c1d2

Please sign in to comment.