File tree 3 files changed +28
-1
lines changed 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 7
7
- display progress during collection only when in a terminal, similar to pytest #1397 issue.
8
8
Thanks Bruno Oliveira for the PR.
9
9
10
+ - fix internal error message when ``--maxfail`` is used (#62, #65).
11
+ Thanks Collin RM Stocks and Bryan A. Jones for reports and Bruno Oliveira for the PR.
12
+
10
13
11
14
1.14
12
15
----
Original file line number Diff line number Diff line change @@ -664,3 +664,24 @@ def test_this(i):
664
664
assert '\x1b [1m' in result .stdout .str ()
665
665
assert 'gw0 [10] / gw1 [10]' in result .stdout .str ()
666
666
assert 'gw0 C / gw1 C' not in result .stdout .str ()
667
+
668
+
669
+ def test_internal_error_with_maxfail (testdir ):
670
+ """
671
+ Internal error when using --maxfail option (#62, #65).
672
+ """
673
+ testdir .makepyfile ("""
674
+ import pytest
675
+
676
+ @pytest.fixture(params=['1', '2'])
677
+ def crasher():
678
+ raise RuntimeError
679
+
680
+ def test_aaa0(crasher):
681
+ pass
682
+ def test_aaa1(crasher):
683
+ pass
684
+ """ )
685
+ result = testdir .runpytest_subprocess ('--maxfail=1' , '-n1' )
686
+ result .stdout .fnmatch_lines (['* 1 error in *' ])
687
+ assert 'INTERNALERROR' not in result .stderr .str ()
Original file line number Diff line number Diff line change @@ -46,7 +46,10 @@ def pytest_runtestloop(self, session):
46
46
self .log ("entering main loop" )
47
47
torun = []
48
48
while 1 :
49
- name , kwargs = self .channel .receive ()
49
+ try :
50
+ name , kwargs = self .channel .receive ()
51
+ except EOFError :
52
+ return True
50
53
self .log ("received command" , name , kwargs )
51
54
if name == "runtests" :
52
55
torun .extend (kwargs ['indices' ])
You can’t perform that action at this time.
0 commit comments