File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ David Mohr
44
44
David Vierra
45
45
Diego Russo
46
46
Dmitry Dygalo
47
+ Duncan Betts
47
48
Edison Gustavo Muenz
48
49
Edoardo Batini
49
50
Eduardo Schettino
Original file line number Diff line number Diff line change 1
1
3.0.5.dev0
2
2
==========
3
3
4
- *
4
+ * Add hint to error message hinting possible missing __init__.py (` #478 `_). Thanks ` @DuncanBetts `_.
5
5
6
6
* An error message is now displayed if ``--confcutdir `` is not a valid directory, avoiding
7
7
subtle bugs (`#2078 `_).
20
20
*
21
21
22
22
.. _@adler-j : https://github.com/adler-j
23
+ .. _@DuncanBetts : https://github.com/DuncanBetts
23
24
.. _@nedbat : https://github.com/nedbat
24
25
26
+ .. _#478 : https://github.com/pytest-dev/pytest/issues/478
25
27
.. _#2038 : https://github.com/pytest-dev/pytest/issues/2038
26
28
.. _#2078 : https://github.com/pytest-dev/pytest/issues/2078
27
29
.. _#2082 : https://github.com/pytest-dev/pytest/issues/2082
Original file line number Diff line number Diff line change @@ -704,10 +704,9 @@ def _parsearg(self, arg):
704
704
path = self .config .invocation_dir .join (relpath , abs = True )
705
705
if not path .check ():
706
706
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?)" )
708
708
else :
709
- msg = "file not found: "
710
- raise pytest .UsageError (msg + arg )
709
+ raise pytest .UsageError ("file not found: " + arg )
711
710
parts [0 ] = path
712
711
return parts
713
712
You can’t perform that action at this time.
0 commit comments