From 23393cf4f2e9f6d2fcd437e2ddb521f60905fb9f Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Mon, 22 Jul 2024 11:33:08 -0500 Subject: [PATCH] Testing: Fix small linting issues --- .../console/tests/test_console_kernel.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/spyder_kernels/console/tests/test_console_kernel.py b/spyder_kernels/console/tests/test_console_kernel.py index 98df39e6..4df7271e 100644 --- a/spyder_kernels/console/tests/test_console_kernel.py +++ b/spyder_kernels/console/tests/test_console_kernel.py @@ -278,7 +278,7 @@ def test_get_namespace_view(kernel): """ Test the namespace view of the kernel. """ - execute = asyncio.run(kernel.do_execute('a = 1', True)) + asyncio.run(kernel.do_execute('a = 1', True)) nsview = repr(kernel.get_namespace_view()) assert "'a':" in nsview @@ -294,7 +294,7 @@ def test_get_namespace_view_filter_on(kernel, filter_on): """ Test the namespace view of the kernel with filters on and off. """ - execute = asyncio.run(kernel.do_execute('a = 1', True)) + asyncio.run(kernel.do_execute('a = 1', True)) asyncio.run(kernel.do_execute('TestFilterOff = 1', True)) settings = kernel.namespace_view_settings @@ -986,7 +986,7 @@ def test_namespaces_in_pdb(kernel): Test namespaces in pdb """ # Define get_ipython for timeit - get_ipython = lambda: kernel.shell + get_ipython = lambda: kernel.shell # noqa kernel.shell.user_ns["test"] = 0 pdb_obj = SpyderPdb() pdb_obj.curframe = inspect.currentframe() @@ -1062,7 +1062,7 @@ def test_functions_with_locals_in_pdb_2(kernel): This is another regression test for spyder-ide/spyder-kernels#345 """ - baba = 1 + baba = 1 # noqa pdb_obj = SpyderPdb() pdb_obj.curframe = inspect.currentframe() pdb_obj.curframe_locals = pdb_obj.curframe.f_locals @@ -1099,7 +1099,7 @@ def test_locals_globals_in_pdb(kernel): """ Test thal locals and globals work properly in Pdb. """ - a = 1 + a = 1 # noqa pdb_obj = SpyderPdb() pdb_obj.curframe = inspect.currentframe() pdb_obj.curframe_locals = pdb_obj.curframe.f_locals @@ -1240,7 +1240,7 @@ def test_debug_namespace(tmpdir): d.write('def func():\n bb = "hello"\n breakpoint()\nfunc()') # Run code file `d` - msg_id = client.execute("%runfile {}".format(repr(str(d)))) + client.execute("%runfile {}".format(repr(str(d)))) # make sure that 'bb' returns 'hello' client.get_stdin_msg(timeout=TIMEOUT) @@ -1371,8 +1371,7 @@ def test_non_strings_in_locals(kernel): This is a regression test for issue spyder-ide/spyder#19145 """ - execute = asyncio.run(kernel.do_execute('locals().update({1:2})', True)) - + asyncio.run(kernel.do_execute('locals().update({1:2})', True)) nsview = repr(kernel.get_namespace_view()) assert "1:" in nsview @@ -1383,9 +1382,7 @@ def test_django_settings(kernel): This is a regression test for issue spyder-ide/spyder#19516 """ - execute = asyncio.run(kernel.do_execute( - 'from django.conf import settings', True)) - + asyncio.run(kernel.do_execute('from django.conf import settings', True)) nsview = repr(kernel.get_namespace_view()) assert "'settings':" in nsview