From 5f226bc82e5db64ccd1f4fcbf907b9eebf7064c4 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 27 Feb 2020 02:17:05 +0100 Subject: [PATCH] Make sure to not execute refactoring tests for Python 2 --- test/test_api/test_refactoring.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_api/test_refactoring.py b/test/test_api/test_refactoring.py index 11c4bf1e..26ac267a 100644 --- a/test/test_api/test_refactoring.py +++ b/test/test_api/test_refactoring.py @@ -13,7 +13,7 @@ def dir_with_content(tmpdir): return tmpdir.strpath -def test_rename_mod(Script, dir_with_content): +def test_rename_mod(Script, dir_with_content, skip_python2): script = Script( 'import modx; modx\n', path=os.path.join(dir_with_content, 'some_script.py'), @@ -50,7 +50,7 @@ def test_rename_mod(Script, dir_with_content): ''').format(dir=dir_with_content) -def test_rename_none_path(Script): +def test_rename_none_path(Script, skip_python2): refactoring = Script('foo', path=None).rename(new_name='bar') with pytest.raises(jedi.RefactoringError, match='on a Script with path=None'): refactoring.apply()