##// END OF EJS Templates
Remove `skip_iptest_but_not_pytest`
Nikita Kniazev -
Show More
@@ -12,7 +12,6 b' import pytest'
12 12
13 13 from IPython.core import inputtransformer2 as ipt2
14 14 from IPython.core.inputtransformer2 import _find_assign_op, make_tokens_by_line
15 from IPython.testing.decorators import skip_iptest_but_not_pytest
16 15
17 16 MULTILINE_MAGIC = ("""\
18 17 a = f()
@@ -285,14 +284,12 b' examples = ['
285 284 ]
286 285
287 286
288 @skip_iptest_but_not_pytest
289 287 @pytest.mark.parametrize("code, expected, number", examples)
290 288 def test_check_complete_param(code, expected, number):
291 289 cc = ipt2.TransformerManager().check_complete
292 290 assert cc(code) == (expected, number)
293 291
294 292
295 @skip_iptest_but_not_pytest
296 293 @pytest.mark.xfail(
297 294 reason="Bug in python 3.9.8 – bpo 45738",
298 295 condition=sys.version_info[:3] == (3, 9, 8),
@@ -972,7 +972,6 b' def event_loop():'
972 972 yield asyncio.get_event_loop_policy().get_event_loop()
973 973
974 974
975 @dec.skip_iptest_but_not_pytest
976 975 @dec.skip_win32
977 976 @pytest.mark.skipif(
978 977 sys.platform == "win32", reason="This test does not run under Windows"
@@ -986,7 +985,6 b' def test_script_out(event_loop):'
986 985 assert ip.user_ns["output"] == "hi\n"
987 986
988 987
989 @dec.skip_iptest_but_not_pytest
990 988 @dec.skip_win32
991 989 @pytest.mark.skipif(
992 990 sys.platform == "win32", reason="This test does not run under Windows"
@@ -999,7 +997,6 b' def test_script_err(event_loop):'
999 997 assert ip.user_ns["error"] == "hello\n"
1000 998
1001 999
1002 @dec.skip_iptest_but_not_pytest
1003 1000 @dec.skip_win32
1004 1001 @pytest.mark.skipif(
1005 1002 sys.platform == "win32", reason="This test does not run under Windows"
@@ -1014,7 +1011,6 b' def test_script_out_err():'
1014 1011 assert ip.user_ns["error"] == "hello\n"
1015 1012
1016 1013
1017 @dec.skip_iptest_but_not_pytest
1018 1014 @dec.skip_win32
1019 1015 @pytest.mark.skipif(
1020 1016 sys.platform == "win32", reason="This test does not run under Windows"
@@ -1027,7 +1023,6 b' async def test_script_bg_out(event_loop):'
1027 1023 event_loop.stop()
1028 1024
1029 1025
1030 @dec.skip_iptest_but_not_pytest
1031 1026 @dec.skip_win32
1032 1027 @pytest.mark.skipif(
1033 1028 sys.platform == "win32", reason="This test does not run under Windows"
@@ -1039,7 +1034,6 b' async def test_script_bg_err():'
1039 1034 ip.user_ns["error"].close()
1040 1035
1041 1036
1042 @dec.skip_iptest_but_not_pytest
1043 1037 @dec.skip_win32
1044 1038 @pytest.mark.skipif(
1045 1039 sys.platform == "win32", reason="This test does not run under Windows"
@@ -11,13 +11,11 b' from IPython.lib import latextools'
11 11 from IPython.testing.decorators import (
12 12 onlyif_cmds_exist,
13 13 skipif_not_matplotlib,
14 skip_iptest_but_not_pytest,
15 14 )
16 15 from IPython.utils.process import FindCmdError
17 16
18 17
19 18 @pytest.mark.parametrize('command', ['latex', 'dvipng'])
20 @skip_iptest_but_not_pytest
21 19 def test_check_latex_to_png_dvipng_fails_when_no_cmd(command):
22 20 def mock_find_cmd(arg):
23 21 if arg == command:
@@ -32,7 +30,6 b' def no_op(*args, **kwargs):'
32 30 yield
33 31
34 32
35 @skip_iptest_but_not_pytest
36 33 @onlyif_cmds_exist("latex", "dvipng")
37 34 @pytest.mark.parametrize("s, wrap", [(u"$$x^2$$", False), (u"x^2", True)])
38 35 def test_latex_to_png_dvipng_runs(s, wrap):
@@ -60,7 +57,6 b' def patch_latextool(mock=mock_kpsewhich):'
60 57
61 58 @pytest.mark.parametrize('context', [no_op, patch_latextool])
62 59 @pytest.mark.parametrize('s_wrap', [("$x^2$", False), ("x^2", True)])
63 @skip_iptest_but_not_pytest
64 60 def test_latex_to_png_mpl_runs(s_wrap, context):
65 61 """
66 62 Test that latex_to_png_mpl just runs without error.
@@ -16,7 +16,6 b' import unittest'
16 16 import pytest
17 17
18 18 from IPython.lib import pretty
19 from IPython.testing.decorators import skip_iptest_but_not_pytest
20 19
21 20 from io import StringIO
22 21
@@ -129,7 +128,6 b' def test_callability_checking():'
129 128 ],
130 129 ),
131 130 )
132 @skip_iptest_but_not_pytest
133 131 def test_sets(obj, expected_output):
134 132 """
135 133 Test that set and frozenset use Python 3 formatting.
@@ -149,17 +149,6 b' def make_label_dec(label, ds=None):'
149 149 return decor
150 150
151 151
152 def skip_iptest_but_not_pytest(f):
153 """
154 Warning this will make the test invisible to iptest.
155 """
156 import os
157
158 if os.environ.get("IPTEST_WORKING_DIR", None) is not None:
159 f.__test__ = False
160 return f
161
162
163 152 def skipif(skip_condition, msg=None):
164 153 """Make function raise SkipTest exception if skip_condition is true
165 154
@@ -17,8 +17,6 b' import sys'
17 17
18 18 import pytest
19 19
20 from IPython.testing.decorators import skip_iptest_but_not_pytest
21
22 20 from IPython.utils import capture
23 21
24 22 #-----------------------------------------------------------------------------
@@ -69,7 +67,6 b' hello_stderr = "hello, stderr"'
69 67 # Test Functions
70 68 #-----------------------------------------------------------------------------
71 69 @pytest.mark.parametrize("method_mime", _mime_map.items())
72 @skip_iptest_but_not_pytest
73 70 def test_rich_output_empty(method_mime):
74 71 """RichOutput with no args"""
75 72 rich = capture.RichOutput()
@@ -88,7 +85,6 b' def test_rich_output():'
88 85 assert rich._repr_svg_() is None
89 86
90 87
91 @skip_iptest_but_not_pytest
92 88 @pytest.mark.parametrize("method_mime", _mime_map.items())
93 89 def test_rich_output_no_metadata(method_mime):
94 90 """test RichOutput with no metadata"""
@@ -98,7 +94,6 b' def test_rich_output_no_metadata(method_mime):'
98 94 assert getattr(rich, method)() == data[mime]
99 95
100 96
101 @skip_iptest_but_not_pytest
102 97 @pytest.mark.parametrize("method_mime", _mime_map.items())
103 98 def test_rich_output_metadata(method_mime):
104 99 """test RichOutput with metadata"""
@@ -17,8 +17,6 b' Authors'
17 17 # Imports
18 18 #-----------------------------------------------------------------------------
19 19
20 from IPython.testing.decorators import skip_iptest_but_not_pytest
21
22 20 # our own
23 21 from IPython.utils.PyColorize import Parser
24 22 import io
@@ -53,7 +51,6 b' class Bar(Super):'
53 51 """
54 52
55 53
56 @skip_iptest_but_not_pytest
57 54 def test_parse_sample(style):
58 55 """and test writing to a buffer"""
59 56 buf = io.StringIO()
@@ -65,7 +62,6 b' def test_parse_sample(style):'
65 62 assert "ERROR" not in f1
66 63
67 64
68 @skip_iptest_but_not_pytest
69 65 def test_parse_error(style):
70 66 p = Parser(style=style)
71 67 f1 = p.format(")", "str")
@@ -3,7 +3,6 b''
3 3 # Distributed under the terms of the Modified BSD License.
4 4
5 5 import pytest
6 from IPython.testing.decorators import skip_iptest_but_not_pytest
7 6
8 7 from IPython.utils.tokenutil import token_at_cursor, line_at_cursor
9 8
@@ -132,7 +131,6 b' def test_line_at_cursor():'
132 131 ["int"] * (22 - 16) + ["map"] * (28 - 22),
133 132 ),
134 133 )
135 @skip_iptest_but_not_pytest
136 134 def test_multiline_statement(c, token):
137 135 cell = """a = (1,
138 136 3)
General Comments 0
You need to be logged in to leave comments. Login now