Skip to content

Commit

Permalink
Testing: Fix small linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Jul 22, 2024
1 parent 4358b7b commit 23393cf
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions spyder_kernels/console/tests/test_console_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 23393cf

Please sign in to comment.