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
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
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
27 - stdout = testdir.runpytest("-v").stdout.str()
28 + stdout = testdir.runpytest("-v", "-p", "no:black").stdout.str()
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
42 assert self.some_attr == 17
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):
51 assert self.some_attr == 17
54 - assert testdir.runpytest().ret is ExitCode.OK
55 + assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
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):
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
81 - stdout = testdir.runpytest("-v").stdout.str()
82 + stdout = testdir.runpytest("-v", "-p", "no:black", "-p", "no:mypy").stdout.str()
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
96 assert self.an_attr == 5
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):
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):
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):
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):
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(
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
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
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
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()
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()
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):
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):
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: