File: 0005-Skip-failing-tests.patch

package info (click to toggle)
pytest-mpl 0.17.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,132 kB
  • sloc: python: 2,514; javascript: 179; makefile: 16
file content (138 lines) | stat: -rw-r--r-- 4,247 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
From: Fukui Daichi <a.dog.will.talk@akane.waseda.jp>
Last-Update: 2022-11-06
Subject: Skip failing tests
Forwarded: not-needed

---
 tests/subtests/test_subtest.py |  4 ++++
 tests/test_pytest_mpl.py       | 22 ++++++++++------------
 2 files changed, 14 insertions(+), 12 deletions(-)

--- pytest-mpl.orig/tests/subtests/test_subtest.py
+++ pytest-mpl/tests/subtests/test_subtest.py
@@ -169,6 +169,7 @@
         pytest.skip("Skipping testing, since `update_summary` is enabled.")
 
 
+@pytest.mark.skip(reason='works only under tox')
 def test_default(tmp_path):
     run_subtest('test_default', tmp_path, [*IMAGE_COMPARISON_MODE])
 
@@ -205,6 +206,7 @@
     assert (tmp_path / 'results' / 'styles.css').exists()
 
 
+@pytest.mark.skip(reason='works only under tox')
 def test_html_images_only(tmp_path):
     run_subtest('test_html_images_only', tmp_path, [*IMAGE_COMPARISON_MODE], summaries=['html'])
     assert (tmp_path / 'results' / 'fig_comparison.html').exists()
@@ -229,6 +231,7 @@
                 xfail=False, generating_hashes=True)
 
 
+@pytest.mark.skip(reason='works only under tox')
 def test_generate_images_only(tmp_path):
     # generating images; no testing
     run_subtest('test_generate_images_only', tmp_path,
@@ -254,6 +257,7 @@
     assert (tmp_path / 'results' / 'fig_comparison.html').exists()
 
 
+@pytest.mark.skip(reason='works only under tox')
 def test_html_generate_images_only(tmp_path):
     # generating images; no testing
     run_subtest('test_html_generate_images_only', tmp_path,
--- pytest-mpl.orig/tests/test_pytest_mpl.py
+++ pytest-mpl/tests/test_pytest_mpl.py
@@ -302,6 +302,7 @@
 """
 
 
+@pytest.mark.skip(reason='works only under tox')
 def test_hash_fails(tmp_path):
     test_file = tmp_path / "test.py"
     test_file.write_text(TEST_FAILING_HASH, encoding="ascii")
@@ -413,6 +414,7 @@
 """
 
 
+@pytest.mark.skip(reason='works only under tox')
 def test_hash_missing(tmp_path):
     test_file = tmp_path / "test.py"
     test_file.write_text(TEST_MISSING_HASH)
@@ -543,11 +545,7 @@
 """
 
 
-@pytest.mark.parametrize("code", [
-    TEST_FAILING_CLASS,
-    TEST_FAILING_CLASS_SETUP_METHOD,
-    TEST_FAILING_UNITTEST_TESTCASE,
-])
+@pytest.mark.skip(reason='works only under tox')
 def test_class_fail(code, tmp_path):
 
     test_file = tmp_path / "test.py"
@@ -563,7 +561,7 @@
     assert code == 0
 
 
-@pytest.mark.parametrize("runpytest_args", [(), ("--mpl",)])
+@pytest.mark.skip(reason='works only under tox')
 def test_user_fail(pytester, runpytest_args):
     pytester.makepyfile(
         """
@@ -578,7 +576,7 @@
     result.stdout.fnmatch_lines("FAILED*Manually failed by user.*")
 
 
-@pytest.mark.parametrize("runpytest_args", [(), ("--mpl",)])
+@pytest.mark.skip(reason='works only under tox')
 def test_user_skip(pytester, runpytest_args):
     pytester.makepyfile(
         """
@@ -592,7 +590,7 @@
     result.assert_outcomes(skipped=1)
 
 
-@pytest.mark.parametrize("runpytest_args", [(), ("--mpl",)])
+@pytest.mark.skip(reason='works only under tox')
 def test_user_importorskip(pytester, runpytest_args):
     pytester.makepyfile(
         """
@@ -606,7 +604,7 @@
     result.assert_outcomes(skipped=1)
 
 
-@pytest.mark.parametrize("runpytest_args", [(), ("--mpl",)])
+@pytest.mark.skip(reason='works only under tox')
 def test_user_xfail(pytester, runpytest_args):
     pytester.makepyfile(
         """
@@ -620,7 +618,7 @@
     result.assert_outcomes(xfailed=1)
 
 
-@pytest.mark.parametrize("runpytest_args", [(), ("--mpl",)])
+@pytest.mark.skip(reason='works only under tox')
 def test_user_exit_success(pytester, runpytest_args):
     pytester.makepyfile(
         """
@@ -636,7 +634,7 @@
     result.stdout.fnmatch_lines("*Exit*Manually exited by user.*")
 
 
-@pytest.mark.parametrize("runpytest_args", [(), ("--mpl",)])
+@pytest.mark.skip(reason='works only under tox')
 def test_user_exit_failure(pytester, runpytest_args):
     pytester.makepyfile(
         """
@@ -652,7 +650,7 @@
     result.stdout.fnmatch_lines("*Exit*Manually exited by user.*")
 
 
-@pytest.mark.parametrize("runpytest_args", [(), ("--mpl",)])
+@pytest.mark.skip(reason='works only under tox')
 def test_user_function_raises(pytester, runpytest_args):
     pytester.makepyfile(
         """