diff --git a/IPython/core/tests/test_inputtransformer2.py b/IPython/core/tests/test_inputtransformer2.py index b00d1a8..f29bb2a 100644 --- a/IPython/core/tests/test_inputtransformer2.py +++ b/IPython/core/tests/test_inputtransformer2.py @@ -12,7 +12,6 @@ import pytest from IPython.core import inputtransformer2 as ipt2 from IPython.core.inputtransformer2 import _find_assign_op, make_tokens_by_line -from IPython.testing.decorators import skip_iptest_but_not_pytest MULTILINE_MAGIC = ("""\ a = f() @@ -285,14 +284,12 @@ examples = [ ] -@skip_iptest_but_not_pytest @pytest.mark.parametrize("code, expected, number", examples) def test_check_complete_param(code, expected, number): cc = ipt2.TransformerManager().check_complete assert cc(code) == (expected, number) -@skip_iptest_but_not_pytest @pytest.mark.xfail( reason="Bug in python 3.9.8 – bpo 45738", condition=sys.version_info[:3] == (3, 9, 8), diff --git a/IPython/core/tests/test_magic.py b/IPython/core/tests/test_magic.py index 0cadae6..95bd85b 100644 --- a/IPython/core/tests/test_magic.py +++ b/IPython/core/tests/test_magic.py @@ -972,7 +972,6 @@ def event_loop(): yield asyncio.get_event_loop_policy().get_event_loop() -@dec.skip_iptest_but_not_pytest @dec.skip_win32 @pytest.mark.skipif( sys.platform == "win32", reason="This test does not run under Windows" @@ -986,7 +985,6 @@ def test_script_out(event_loop): assert ip.user_ns["output"] == "hi\n" -@dec.skip_iptest_but_not_pytest @dec.skip_win32 @pytest.mark.skipif( sys.platform == "win32", reason="This test does not run under Windows" @@ -999,7 +997,6 @@ def test_script_err(event_loop): assert ip.user_ns["error"] == "hello\n" -@dec.skip_iptest_but_not_pytest @dec.skip_win32 @pytest.mark.skipif( sys.platform == "win32", reason="This test does not run under Windows" @@ -1014,7 +1011,6 @@ def test_script_out_err(): assert ip.user_ns["error"] == "hello\n" -@dec.skip_iptest_but_not_pytest @dec.skip_win32 @pytest.mark.skipif( sys.platform == "win32", reason="This test does not run under Windows" @@ -1027,7 +1023,6 @@ async def test_script_bg_out(event_loop): event_loop.stop() -@dec.skip_iptest_but_not_pytest @dec.skip_win32 @pytest.mark.skipif( sys.platform == "win32", reason="This test does not run under Windows" @@ -1039,7 +1034,6 @@ async def test_script_bg_err(): ip.user_ns["error"].close() -@dec.skip_iptest_but_not_pytest @dec.skip_win32 @pytest.mark.skipif( sys.platform == "win32", reason="This test does not run under Windows" diff --git a/IPython/lib/tests/test_latextools.py b/IPython/lib/tests/test_latextools.py index 60a7589..ead73ab 100644 --- a/IPython/lib/tests/test_latextools.py +++ b/IPython/lib/tests/test_latextools.py @@ -11,13 +11,11 @@ from IPython.lib import latextools from IPython.testing.decorators import ( onlyif_cmds_exist, skipif_not_matplotlib, - skip_iptest_but_not_pytest, ) from IPython.utils.process import FindCmdError @pytest.mark.parametrize('command', ['latex', 'dvipng']) -@skip_iptest_but_not_pytest def test_check_latex_to_png_dvipng_fails_when_no_cmd(command): def mock_find_cmd(arg): if arg == command: @@ -32,7 +30,6 @@ def no_op(*args, **kwargs): yield -@skip_iptest_but_not_pytest @onlyif_cmds_exist("latex", "dvipng") @pytest.mark.parametrize("s, wrap", [(u"$$x^2$$", False), (u"x^2", True)]) def test_latex_to_png_dvipng_runs(s, wrap): @@ -60,7 +57,6 @@ def patch_latextool(mock=mock_kpsewhich): @pytest.mark.parametrize('context', [no_op, patch_latextool]) @pytest.mark.parametrize('s_wrap', [("$x^2$", False), ("x^2", True)]) -@skip_iptest_but_not_pytest def test_latex_to_png_mpl_runs(s_wrap, context): """ Test that latex_to_png_mpl just runs without error. diff --git a/IPython/lib/tests/test_pretty.py b/IPython/lib/tests/test_pretty.py index ec1211a..8b8a6ee 100644 --- a/IPython/lib/tests/test_pretty.py +++ b/IPython/lib/tests/test_pretty.py @@ -16,7 +16,6 @@ import unittest import pytest from IPython.lib import pretty -from IPython.testing.decorators import skip_iptest_but_not_pytest from io import StringIO @@ -129,7 +128,6 @@ def test_callability_checking(): ], ), ) -@skip_iptest_but_not_pytest def test_sets(obj, expected_output): """ Test that set and frozenset use Python 3 formatting. diff --git a/IPython/testing/decorators.py b/IPython/testing/decorators.py index 74af7c1..93f55d9 100644 --- a/IPython/testing/decorators.py +++ b/IPython/testing/decorators.py @@ -149,17 +149,6 @@ def make_label_dec(label, ds=None): return decor -def skip_iptest_but_not_pytest(f): - """ - Warning this will make the test invisible to iptest. - """ - import os - - if os.environ.get("IPTEST_WORKING_DIR", None) is not None: - f.__test__ = False - return f - - def skipif(skip_condition, msg=None): """Make function raise SkipTest exception if skip_condition is true diff --git a/IPython/utils/tests/test_capture.py b/IPython/utils/tests/test_capture.py index 3cfa827..8645ed1 100644 --- a/IPython/utils/tests/test_capture.py +++ b/IPython/utils/tests/test_capture.py @@ -17,8 +17,6 @@ import sys import pytest -from IPython.testing.decorators import skip_iptest_but_not_pytest - from IPython.utils import capture #----------------------------------------------------------------------------- @@ -69,7 +67,6 @@ hello_stderr = "hello, stderr" # Test Functions #----------------------------------------------------------------------------- @pytest.mark.parametrize("method_mime", _mime_map.items()) -@skip_iptest_but_not_pytest def test_rich_output_empty(method_mime): """RichOutput with no args""" rich = capture.RichOutput() @@ -88,7 +85,6 @@ def test_rich_output(): assert rich._repr_svg_() is None -@skip_iptest_but_not_pytest @pytest.mark.parametrize("method_mime", _mime_map.items()) def test_rich_output_no_metadata(method_mime): """test RichOutput with no metadata""" @@ -98,7 +94,6 @@ def test_rich_output_no_metadata(method_mime): assert getattr(rich, method)() == data[mime] -@skip_iptest_but_not_pytest @pytest.mark.parametrize("method_mime", _mime_map.items()) def test_rich_output_metadata(method_mime): """test RichOutput with metadata""" diff --git a/IPython/utils/tests/test_pycolorize.py b/IPython/utils/tests/test_pycolorize.py index 178f4a9..05d51b6 100644 --- a/IPython/utils/tests/test_pycolorize.py +++ b/IPython/utils/tests/test_pycolorize.py @@ -17,8 +17,6 @@ Authors # Imports #----------------------------------------------------------------------------- -from IPython.testing.decorators import skip_iptest_but_not_pytest - # our own from IPython.utils.PyColorize import Parser import io @@ -53,7 +51,6 @@ class Bar(Super): """ -@skip_iptest_but_not_pytest def test_parse_sample(style): """and test writing to a buffer""" buf = io.StringIO() @@ -65,7 +62,6 @@ def test_parse_sample(style): assert "ERROR" not in f1 -@skip_iptest_but_not_pytest def test_parse_error(style): p = Parser(style=style) f1 = p.format(")", "str") diff --git a/IPython/utils/tests/test_tokenutil.py b/IPython/utils/tests/test_tokenutil.py index 406c0ae..c4539d1 100644 --- a/IPython/utils/tests/test_tokenutil.py +++ b/IPython/utils/tests/test_tokenutil.py @@ -3,7 +3,6 @@ # Distributed under the terms of the Modified BSD License. import pytest -from IPython.testing.decorators import skip_iptest_but_not_pytest from IPython.utils.tokenutil import token_at_cursor, line_at_cursor @@ -132,7 +131,6 @@ def test_line_at_cursor(): ["int"] * (22 - 16) + ["map"] * (28 - 22), ), ) -@skip_iptest_but_not_pytest def test_multiline_statement(c, token): cell = """a = (1, 3)