python/stevedore: update to 5.4.0
[oi-userland.git] / components / python / pytest-relaxed / patches / 01-test-disable-pytest-plugins.patch
blob09b32a27198e5e5f5657e887f487bb5c86aa1e51
1 Some pytest plugins needs to be disabled because they produce unexpected output.
3 --- pytest-relaxed-2.0.2/tests/test_collection.py.orig
4 +++ pytest-relaxed-2.0.2/tests/test_collection.py
5 @@ -41,7 +41,7 @@
6 """
8 # TODO: why Result.str() and not str(Result)? Seems unPythonic
9 - stdout = testdir.runpytest().stdout.str()
10 + stdout = testdir.runpytest("-p", "no:cov", "-p", "no:black").stdout.str()
11 assert "hastests.py" in stdout
12 assert "_util.py" not in stdout
14 @@ -80,7 +80,7 @@
15 pass
16 """
18 - stdout = testdir.runpytest().stdout.str()
19 + stdout = testdir.runpytest("-p", "no:cov", "-p", "no:black", "-p", "no:mypy").stdout.str()
20 assert "actual_tests.py" in stdout
21 assert "conftest.py" not in stdout
23 @@ -118,7 +118,7 @@
24 pass
25 """
27 - stdout = testdir.runpytest("-v").stdout.str()
28 + stdout = testdir.runpytest("-v", "-p", "no:black").stdout.str()
29 for substring in (
30 "hello how are you",
31 "please test me thx",
32 @@ -192,7 +192,7 @@
33 pass
34 """
36 - stdout = testdir.runpytest("-v").stdout.str()
37 + stdout = testdir.runpytest("-v", "-p", "no:black").stdout.str()
38 assert "actual test here" in stdout
39 # will be in stdout as a failure and warning if bug present
40 assert "pls_noload" not in stdout
41 @@ -216,7 +216,7 @@
42 assert self.some_attr == 17
43 """
45 - assert testdir.runpytest().ret is ExitCode.OK
46 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
48 def test_setup_method_given_inner_class_instances(self, testdir):
49 testdir.makepyfile(
50 @@ -230,7 +230,7 @@
51 assert self.some_attr == 17
52 """
54 - assert testdir.runpytest().ret is ExitCode.OK
55 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
58 class TestSpecModule:
59 @@ -243,7 +243,7 @@
60 pass
61 """
63 - stdout = testdir.runpytest("-v").stdout.str()
64 + stdout = testdir.runpytest("-v", "-p", "no:black").stdout.str()
65 assert "some_uncallable" not in stdout
67 def test_skips_imported_objects(self, testdir):
68 @@ -267,7 +267,7 @@
69 pass
70 """
72 - stdout = testdir.runpytest("-v").stdout.str()
73 + stdout = testdir.runpytest("-v", "-p", "no:black", "-p", "no:helpers_namespace").stdout.str()
74 assert "a test is me" in stdout
75 assert "helper" not in stdout
76 assert "Helper" not in stdout
77 @@ -342,7 +342,7 @@
78 pass
79 """
81 - stdout = testdir.runpytest("-v").stdout.str()
82 + stdout = testdir.runpytest("-v", "-p", "no:black", "-p", "no:mypy").stdout.str()
83 expected = """
84 MyStuff
86 @@ -381,7 +381,7 @@
87 # TODO: first thought was "why is this not automatic?", then realized
88 # "duh, it'd be annoying if you wanted to test failure related behavior
89 # a lot"...but still want some slightly nicer helper I think
90 - assert testdir.runpytest().ret is ExitCode.OK
91 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
93 def test_nested_self_objects_exhibit_parent_attributes(self, testdir):
94 # TODO: really starting to think going back to 'real' fixture files
95 @@ -398,7 +398,7 @@
96 assert self.an_attr == 5
97 """
99 - assert testdir.runpytest().ret is ExitCode.OK
100 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
102 def test_nesting_is_infinite(self, testdir):
103 testdir.makepyfile(
104 @@ -414,7 +414,7 @@
105 assert self.an_attr == 5
108 - assert testdir.runpytest().ret is ExitCode.OK
109 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
111 def test_overriding_works_naturally(self, testdir):
112 testdir.makepyfile(
113 @@ -429,7 +429,7 @@
114 assert self.an_attr == 7
117 - assert testdir.runpytest().ret is ExitCode.OK
118 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
120 def test_normal_methods_from_outer_classes_are_not_copied(self, testdir):
121 testdir.makepyfile(
122 @@ -443,7 +443,7 @@
123 assert not hasattr(self, 'outer_test')
126 - assert testdir.runpytest().ret is ExitCode.OK
127 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
129 def test_private_methods_from_outer_classes_are_copied(self, testdir):
130 testdir.makepyfile(
131 @@ -461,7 +461,7 @@
132 assert hasattr(self, '_outer_helper')
135 - assert testdir.runpytest().ret is ExitCode.OK
136 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
138 def test_module_contents_are_not_copied_into_top_level_classes(
139 self, testdir
140 @@ -475,4 +475,4 @@
141 assert not hasattr(self, 'module_constant')
144 - assert testdir.runpytest().ret is ExitCode.OK
145 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
146 --- pytest-relaxed-2.0.2/tests/test_display.py.orig
147 +++ pytest-relaxed-2.0.2/tests/test_display.py
148 @@ -10,7 +10,7 @@
151 def _expect_regular_output(testdir):
152 - output = testdir.runpytest().stdout.str()
153 + output = testdir.runpytest("-p", "no:black", "-p", "no:mypy", "-p", "no:randomly").stdout.str()
154 # Regular results w/ status letters
155 assert "behaviors.py .." in output
156 assert "other_behaviors.py s.F." in output
157 @@ -77,7 +77,7 @@
158 some things
159 other things
160 """.lstrip()
161 - output = testdir.runpytest_subprocess("-v").stdout.str()
162 + output = testdir.runpytest_subprocess("-v", "-p", "no:black", "-p", "no:randomly").stdout.str()
163 assert expected in output
166 @@ -147,7 +147,7 @@
167 assert False
168 """,
170 - output = testdir.runpytest_subprocess("-v").stdout.str()
171 + output = testdir.runpytest_subprocess("-v", "-p", "no:black", "-p", "no:mypy", "-p", "no:randomly").stdout.str()
172 results = """
173 Behaviors
175 @@ -200,7 +200,7 @@
176 assert False
177 """,
179 - output = testdir.runpytest_subprocess("-v").stdout.str()
180 + output = testdir.runpytest_subprocess("-v", "-p", "no:black", "-p", "no:mypy", "-p", "no:randomly").stdout.str()
181 results = """
182 Behaviors
184 @@ -272,7 +272,7 @@
186 still works
187 """.lstrip()
188 - assert expected in testdir.runpytest("-v").stdout.str()
189 + assert expected in testdir.runpytest("-v", "-p", "no:black", "-p", "no:randomly").stdout.str()
191 def test_headers_and_tests_have_underscores_turn_to_spaces(self, testdir):
192 testdir.makepyfile(
193 @@ -303,7 +303,7 @@
194 the stuff
196 """.lstrip()
197 - assert expected in testdir.runpytest("-v").stdout.str()
198 + assert expected in testdir.runpytest("-v", "-p", "no:black", "-p", "no:mypy").stdout.str()
200 def test_test_suffixes_are_stripped(self, testdir):
201 testdir.makepyfile(
202 @@ -319,7 +319,7 @@
205 """.lstrip()
206 - assert expected in testdir.runpytest("-v").stdout.str()
207 + assert expected in testdir.runpytest("-v", "-p", "no:black", "-p", "no:mypy").stdout.str()
210 class TestNormalMixed: