File tree Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ David Vierra
37
37
Diego Russo
38
38
Dmitry Dygalo
39
39
Edison Gustavo Muenz
40
+ Edoardo Batini
40
41
Eduardo Schettino
41
42
Elizaveta Shashkova
42
43
Endre Galaczi
Original file line number Diff line number Diff line change 3
3
4
4
**Bug Fixes **
5
5
6
+ * Add an 'E' to the first line of error messages from FixtureLookupErrorRepr.
7
+ Fixes `#717 `_. Thanks `@blueyed `_ for reporting, `@eolo999 `_ for the PR
8
+ and `@tomviner `_ for his guidance during EuroPython2016 sprint.
9
+
6
10
* Text documents without any doctests no longer appear as "skipped".
7
11
Thanks `@graingert `_ for reporting and providing a full PR (`#1580 `_).
8
12
54
58
* Fixed collection of classes with custom ``__new__ `` method.
55
59
Fixes `#1579 `_. Thanks to `@Stranger6667 `_ for the PR.
56
60
61
+ .. _#717 : https://github.com/pytest-dev/pytest/issues/717
57
62
.. _#1579 : https://github.com/pytest-dev/pytest/issues/1579
58
63
.. _#1580 : https://github.com/pytest-dev/pytest/pull/1580
59
64
.. _#1605 : https://github.com/pytest-dev/pytest/issues/1605
66
71
.. _#925 : https://github.com/pytest-dev/pytest/issues/925
67
72
.. _#1210 : https://github.com/pytest-dev/pytest/issues/1210
68
73
74
+ .. _@eolo999 : https://github.com/eolo999
75
+ .. _@blueyed : https://github.com/blueyed
69
76
.. _@graingert : https://github.com/graingert
70
77
.. _@taschini : https://github.com/taschini
71
78
.. _@nikratio : https://github.com/nikratio
Original file line number Diff line number Diff line change @@ -1842,8 +1842,13 @@ def toterminal(self, tw):
1842
1842
#tw.line("FixtureLookupError: %s" %(self.argname), red=True)
1843
1843
for tbline in self .tblines :
1844
1844
tw .line (tbline .rstrip ())
1845
- for line in self .errorstring .split ("\n " ):
1846
- tw .line (" " + line .strip (), red = True )
1845
+ lines = self .errorstring .split ("\n " )
1846
+ for line in lines :
1847
+ if line == lines [0 ]:
1848
+ prefix = 'E '
1849
+ else :
1850
+ prefix = ' '
1851
+ tw .line (prefix + line .strip (), red = True )
1847
1852
tw .line ()
1848
1853
tw .line ("%s:%d" % (self .filename , self .firstlineno + 1 ))
1849
1854
Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ def test_foo(invalid_fixture):
376
376
res = testdir .runpytest (p )
377
377
res .stdout .fnmatch_lines ([
378
378
"*source code not available*" ,
379
- "*fixture 'invalid_fixture' not found" ,
379
+ "E *fixture 'invalid_fixture' not found" ,
380
380
])
381
381
382
382
def test_plugins_given_as_strings (self , tmpdir , monkeypatch ):
Original file line number Diff line number Diff line change @@ -416,9 +416,9 @@ def test_two(capfd, capsys):
416
416
result = testdir .runpytest (p )
417
417
result .stdout .fnmatch_lines ([
418
418
"*ERROR*setup*test_one*" ,
419
- "*capsys*capfd*same*time*" ,
419
+ "E *capsys*capfd*same*time*" ,
420
420
"*ERROR*setup*test_two*" ,
421
- "*capsys*capfd*same*time*" ,
421
+ "E *capsys*capfd*same*time*" ,
422
422
"*2 error*" ])
423
423
424
424
@pytest .mark .parametrize ("method" , ["sys" , "fd" ])
You can’t perform that action at this time.
0 commit comments