Skip to content

Commit ba3c1d2

Browse files
author
Duncan Betts
committed
Add hint of Issue #478 to error text
1 parent 38f7562 commit ba3c1d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

_pytest/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,9 @@ def _parsearg(self, arg):
704704
path = self.config.invocation_dir.join(relpath, abs=True)
705705
if not path.check():
706706
if self.config.option.pyargs:
707-
msg = "file or package not found: "
707+
raise pytest.UsageError("file or package not found: " + arg + " (missing __init__.py?)")
708708
else:
709-
msg = "file not found: "
710-
raise pytest.UsageError(msg + arg)
709+
raise pytest.UsageError("file not found: " + arg)
711710
parts[0] = path
712711
return parts
713712

0 commit comments

Comments
 (0)