File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1020,7 +1020,7 @@ def show_skipped(lines: List[str]) -> None:
10201020 self .write_line (line )
10211021
10221022 def _get_main_color (self ) -> Tuple [str , List [str ]]:
1023- if self ._main_color is None or self ._known_types is None :
1023+ if self ._main_color is None or self ._known_types is None or self . _is_last_item :
10241024 self ._set_main_color ()
10251025 assert self ._main_color
10261026 assert self ._known_types
Original file line number Diff line number Diff line change @@ -1705,6 +1705,18 @@ def test_foobar(i): raise ValueError()
17051705 ]
17061706 )
17071707
1708+ # Only xfail should have yellow progress indicator.
1709+ result = testdir .runpytest ("test_axfail.py" )
1710+ result .stdout .re_match_lines (
1711+ [
1712+ line .format (** RE_COLORS )
1713+ for line in [
1714+ r"test_axfail.py {yellow}x{reset}{yellow} \s+ \[100%\]{reset}" ,
1715+ r"^{yellow}=+ ({yellow}{bold}|{bold}{yellow})1 xfailed{reset}{yellow} in " ,
1716+ ]
1717+ ]
1718+ )
1719+
17081720 def test_count (self , many_tests_files , testdir ):
17091721 testdir .makeini (
17101722 """
You can’t perform that action at this time.
0 commit comments