commit | author | age
|
d2275f
|
1 |
Some pytest plugins needs to be disabled because they produce unexpected output. |
MT |
2 |
|
fe6eb2
|
3 |
--- pytest-relaxed-2.0.2/tests/test_collection.py.orig |
MT |
4 |
+++ pytest-relaxed-2.0.2/tests/test_collection.py |
d2275f
|
5 |
@@ -41,7 +41,7 @@ |
MT |
6 |
""" |
|
7 |
) |
|
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 |
|
13 |
|
|
14 |
@@ -80,7 +80,7 @@ |
|
15 |
pass |
|
16 |
""" |
|
17 |
) |
|
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 |
|
22 |
|
|
23 |
@@ -118,7 +118,7 @@ |
|
24 |
pass |
|
25 |
""" |
|
26 |
) |
|
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 |
""" |
|
35 |
) |
|
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 |
""" |
|
44 |
) |
|
45 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
46 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
|
47 |
|
|
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 |
""" |
|
53 |
) |
|
54 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
55 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
|
56 |
|
|
57 |
|
|
58 |
class TestSpecModule: |
|
59 |
@@ -243,7 +243,7 @@ |
|
60 |
pass |
|
61 |
""" |
|
62 |
) |
|
63 |
- stdout = testdir.runpytest("-v").stdout.str() |
|
64 |
+ stdout = testdir.runpytest("-v", "-p", "no:black").stdout.str() |
|
65 |
assert "some_uncallable" not in stdout |
|
66 |
|
|
67 |
def test_skips_imported_objects(self, testdir): |
|
68 |
@@ -267,7 +267,7 @@ |
|
69 |
pass |
|
70 |
""" |
|
71 |
) |
|
72 |
- stdout = testdir.runpytest("-v").stdout.str() |
1e4982
|
73 |
+ stdout = testdir.runpytest("-v", "-p", "no:black", "-p", "no:helpers_namespace").stdout.str() |
d2275f
|
74 |
assert "a test is me" in stdout |
MT |
75 |
assert "helper" not in stdout |
|
76 |
assert "Helper" not in stdout |
|
77 |
@@ -342,7 +342,7 @@ |
|
78 |
pass |
|
79 |
""" |
|
80 |
) |
|
81 |
- stdout = testdir.runpytest("-v").stdout.str() |
|
82 |
+ stdout = testdir.runpytest("-v", "-p", "no:black", "-p", "no:mypy").stdout.str() |
|
83 |
expected = """ |
|
84 |
MyStuff |
|
85 |
|
|
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 |
|
92 |
|
|
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 |
""" |
|
98 |
) |
|
99 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
100 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
|
101 |
|
|
102 |
def test_nesting_is_infinite(self, testdir): |
|
103 |
testdir.makepyfile( |
|
104 |
@@ -414,7 +414,7 @@ |
|
105 |
assert self.an_attr == 5 |
|
106 |
""" |
|
107 |
) |
|
108 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
109 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
|
110 |
|
|
111 |
def test_overriding_works_naturally(self, testdir): |
|
112 |
testdir.makepyfile( |
|
113 |
@@ -429,7 +429,7 @@ |
|
114 |
assert self.an_attr == 7 |
|
115 |
""" |
|
116 |
) |
|
117 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
118 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
|
119 |
|
|
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') |
|
124 |
""" |
|
125 |
) |
|
126 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
127 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
|
128 |
|
|
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') |
|
133 |
""" |
|
134 |
) |
|
135 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
136 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
|
137 |
|
|
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') |
|
142 |
""" |
|
143 |
) |
|
144 |
- assert testdir.runpytest().ret is ExitCode.OK |
|
145 |
+ assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK |
fe6eb2
|
146 |
--- pytest-relaxed-2.0.2/tests/test_display.py.orig |
MT |
147 |
+++ pytest-relaxed-2.0.2/tests/test_display.py |
d2275f
|
148 |
@@ -10,7 +10,7 @@ |
MT |
149 |
|
|
150 |
|
|
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 |
|
164 |
|
|
165 |
|
|
166 |
@@ -147,7 +147,7 @@ |
|
167 |
assert False |
|
168 |
""", |
|
169 |
) |
|
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 |
|
174 |
|
|
175 |
@@ -200,7 +200,7 @@ |
|
176 |
assert False |
|
177 |
""", |
|
178 |
) |
|
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 |
|
183 |
|
|
184 |
@@ -272,7 +272,7 @@ |
|
185 |
yup |
|
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() |
|
190 |
|
|
191 |
def test_headers_and_tests_have_underscores_turn_to_spaces(self, testdir): |
|
192 |
testdir.makepyfile( |
|
193 |
@@ -303,7 +303,7 @@ |
|
194 |
the stuff |
|
195 |
|
|
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() |
|
199 |
|
|
200 |
def test_test_suffixes_are_stripped(self, testdir): |
|
201 |
testdir.makepyfile( |
|
202 |
@@ -319,7 +319,7 @@ |
|
203 |
yup |
|
204 |
|
|
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() |
|
208 |
|
|
209 |
|
|
210 |
class TestNormalMixed: |