File tree 2 files changed +0
-25
lines changed 2 files changed +0
-25
lines changed Original file line number Diff line number Diff line change 3
3
from typing import List
4
4
5
5
import pytest
6
- from _pytest .pytester import RunResult
7
6
from _pytest .pytester import Testdir
8
7
9
8
if sys .gettrace ():
@@ -175,27 +174,6 @@ def format_for_rematch(cls, lines: List[str]) -> List[str]:
175
174
"""Replace color names for use with LineMatcher.re_match_lines"""
176
175
return [line .format (** cls .RE_COLORS ) for line in lines ]
177
176
178
- @classmethod
179
- def requires_ordered_markup (cls , result : RunResult ):
180
- """Should be called if a test expects markup to appear in the output
181
- in the order they were passed, for example:
182
-
183
- tw.write(line, bold=True, red=True)
184
-
185
- In Python 3.5 there's no guarantee that the generated markup will appear
186
- in the order called, so we do some limited color testing and skip the rest of
187
- the test.
188
- """
189
- if sys .version_info < (3 , 6 ):
190
- # terminal writer.write accepts keyword arguments, so
191
- # py36+ is required so the markup appears in the expected order
192
- output = result .stdout .str ()
193
- assert "test session starts" in output
194
- assert "\x1b [1m" in output
195
- pytest .skip (
196
- "doing limited testing because lacking ordered markup on py35"
197
- )
198
-
199
177
return ColorMapping
200
178
201
179
Original file line number Diff line number Diff line change @@ -1017,7 +1017,6 @@ def test_this():
1017
1017
"""
1018
1018
)
1019
1019
result = testdir .runpytest ("--color=yes" , str (p1 ))
1020
- color_mapping .requires_ordered_markup (result )
1021
1020
result .stdout .fnmatch_lines (
1022
1021
color_mapping .format_for_fnmatch (
1023
1022
[
@@ -2217,7 +2216,6 @@ def test_foo():
2217
2216
"""
2218
2217
)
2219
2218
result = testdir .runpytest ("--color=yes" )
2220
- color_mapping .requires_ordered_markup (result )
2221
2219
result .stdout .fnmatch_lines (
2222
2220
color_mapping .format_for_fnmatch (
2223
2221
[
@@ -2237,7 +2235,6 @@ def test_foo():
2237
2235
"""
2238
2236
)
2239
2237
result = testdir .runpytest ("--color=yes" )
2240
- color_mapping .requires_ordered_markup (result )
2241
2238
2242
2239
result .stdout .fnmatch_lines (
2243
2240
color_mapping .format_for_fnmatch (
You can’t perform that action at this time.
0 commit comments