diff --git a/IPython/core/tests/print_argv.py b/IPython/core/tests/print_argv.py index 0e92bdd..4ec9e27 100644 --- a/IPython/core/tests/print_argv.py +++ b/IPython/core/tests/print_argv.py @@ -1,2 +1,3 @@ import sys + print(sys.argv[1:]) diff --git a/IPython/core/tests/test_autocall.py b/IPython/core/tests/test_autocall.py index ded9f78..925a1cc 100644 --- a/IPython/core/tests/test_autocall.py +++ b/IPython/core/tests/test_autocall.py @@ -8,6 +8,7 @@ with better-isolated tests that don't rely on the global instance in iptest. from IPython.core.splitinput import LineInfo from IPython.core.prefilter import AutocallChecker + def doctest_autocall(): """ In [1]: def f1(a,b,c): diff --git a/IPython/core/tests/test_splitinput.py b/IPython/core/tests/test_splitinput.py index 8969da2..1462e7f 100644 --- a/IPython/core/tests/test_splitinput.py +++ b/IPython/core/tests/test_splitinput.py @@ -32,6 +32,7 @@ tests.append(("Pérez Fernando", ("", "", "Pérez", "Fernando"))) def test_split_user_input(): return tt.check_pairs(split_user_input, tests) + def test_LineInfo(): """Simple test for LineInfo construction and str()""" linfo = LineInfo(" %cd /home") diff --git a/IPython/lib/tests/test_clipboard.py b/IPython/lib/tests/test_clipboard.py index 802f753..6597c94 100644 --- a/IPython/lib/tests/test_clipboard.py +++ b/IPython/lib/tests/test_clipboard.py @@ -2,6 +2,7 @@ from IPython.core.error import TryNext from IPython.lib.clipboard import ClipboardEmpty from IPython.testing.decorators import skip_if_no_x11 + @skip_if_no_x11 def test_clipboard_get(): # Smoketest for clipboard access - we can't easily guarantee that the diff --git a/IPython/utils/contexts.py b/IPython/utils/contexts.py index 7f95d44..73c3f2e 100644 --- a/IPython/utils/contexts.py +++ b/IPython/utils/contexts.py @@ -7,6 +7,7 @@ import warnings # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. + class preserve_keys(object): """Preserve a set of keys in a dictionary. diff --git a/IPython/utils/eventful.py b/IPython/utils/eventful.py index 661851e..837c6e0 100644 --- a/IPython/utils/eventful.py +++ b/IPython/utils/eventful.py @@ -1,4 +1,3 @@ - from warnings import warn warn("IPython.utils.eventful has moved to traitlets.eventful", stacklevel=2) diff --git a/IPython/utils/log.py b/IPython/utils/log.py index bb262ed..f9dea91 100644 --- a/IPython/utils/log.py +++ b/IPython/utils/log.py @@ -1,4 +1,3 @@ - from warnings import warn warn("IPython.utils.log has moved to traitlets.log", stacklevel=2) diff --git a/IPython/utils/tempdir.py b/IPython/utils/tempdir.py index 5afc5d6..a233c73 100644 --- a/IPython/utils/tempdir.py +++ b/IPython/utils/tempdir.py @@ -48,6 +48,7 @@ class TemporaryWorkingDirectory(TemporaryDirectory): with TemporaryWorkingDirectory() as tmpdir: ... """ + def __enter__(self): self.old_wd = Path.cwd() _os.chdir(self.name)