fix: pep8
Esse commit está contido em:
+4
-2
@@ -50,7 +50,8 @@ def run_pytest(run_slow=False, extra_args=None, remoteclient=False):
|
||||
pytest_args += extra_args
|
||||
|
||||
if remoteclient:
|
||||
pytest_args += ['--container-scope=class' ,'./spyder/plugins/remoteclient']
|
||||
pytest_args += ['--container-scope=class',
|
||||
'./spyder/plugins/remoteclient']
|
||||
os.environ["SPYDER_TEST_REMOTE_CLIENT"] = "true"
|
||||
else:
|
||||
pytest_args += ['--ignore=./spyder/plugins/remoteclient']
|
||||
@@ -68,7 +69,8 @@ def run_pytest(run_slow=False, extra_args=None, remoteclient=False):
|
||||
def main():
|
||||
"""Parse args then run the pytest suite for Spyder."""
|
||||
test_parser = argparse.ArgumentParser(
|
||||
usage='python runtests.py [-h] [--run-slow] [--remote-client] [pytest_args]',
|
||||
usage=('python runtests.py'
|
||||
'[-h] [--run-slow] [--remote-client] [pytest_args]'),
|
||||
description="Helper script to run Spyder's test suite")
|
||||
test_parser.add_argument('--run-slow', action='store_true', default=False,
|
||||
help='Run the slow tests')
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
from concurrent.futures import Future
|
||||
import contextlib
|
||||
import gc
|
||||
import os
|
||||
from pathlib import Path
|
||||
@@ -26,10 +25,8 @@ from spyder.api.plugin_registration.registry import PLUGIN_REGISTRY
|
||||
from spyder.app.cli_options import get_options
|
||||
from spyder.config.manager import CONF
|
||||
from spyder.plugins.ipythonconsole.plugin import IPythonConsole
|
||||
from spyder.plugins.remoteclient.api.client import SpyderRemoteClient
|
||||
from spyder.plugins.remoteclient.plugin import RemoteClient
|
||||
from spyder.plugins.remoteclient.widgets import AuthenticationMethod
|
||||
from spyder.utils.qthelpers import qapplication
|
||||
|
||||
|
||||
T = typing.TypeVar("T")
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
"""IPython console and Spyder Remote Client integration tests."""
|
||||
|
||||
# Third party imports
|
||||
import pytest
|
||||
from flaky import flaky
|
||||
import pytest
|
||||
|
||||
# Local imports
|
||||
from spyder.plugins.remoteclient.tests.conftest import await_future
|
||||
@@ -45,10 +45,6 @@ class TestIpythonConsole:
|
||||
with qtbot.waitSignal(shell.executed):
|
||||
shell.execute("a = 10")
|
||||
|
||||
# Restart kernel and wait until it's up again.
|
||||
# NOTE: We trigger the restart_action instead of calling `restart_kernel`
|
||||
# directly to also check that that action is working as expected and avoid
|
||||
# regressions such as spyder-ide/spyder#22084.
|
||||
shell._prompt_html = None
|
||||
ipyconsole.get_widget().restart_action.trigger()
|
||||
qtbot.waitUntil(
|
||||
@@ -89,12 +85,12 @@ class TestIpythonConsole:
|
||||
"import os, signal; os.kill(os.getpid(), signal.SIGTERM)"
|
||||
)
|
||||
|
||||
# Since the heartbeat and the tunnels are running in separate threads, we
|
||||
# need to make sure that the heartbeat thread has "higher" priority than
|
||||
# the tunnel thread, otherwise the kernel will be restarted and the tunnels
|
||||
# recreated before the heartbeat can detect the kernel is dead.
|
||||
# In the test enviroment, the heartbeat needs to be set to a lower value
|
||||
# because there are fewer threads running.
|
||||
# Since the heartbeat and the tunnels are running in separate threads,
|
||||
# we need to make sure that the heartbeat thread has "higher" priority
|
||||
# than the tunnel thread, otherwise the kernel will be restarted and
|
||||
# the tunnels recreated before the heartbeat can detect the kernel
|
||||
# is dead. In the test enviroment, the heartbeat needs to be set to a
|
||||
# lower value because there are fewer threads running.
|
||||
shell.kernel_handler.set_time_to_dead(0.2)
|
||||
|
||||
with qtbot.waitSignal(shell.sig_prompt_ready, timeout=30000):
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário