Skip to content

Commit

Permalink
Increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Zybulon committed Sep 21, 2024
1 parent 8e4dfbf commit d979575
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def main():
errno = pytest.main(['-x', 'spyder_terminal', '-v',
'-rw', '--durations=10',
'--cov=spyder_terminal', '--cov-report=term-missing',
'--timeout=60'])
'--timeout=600'])

# sys.exit doesn't work here because some things could be running
# in the background (e.g. closing the main window) when this point
Expand Down
34 changes: 17 additions & 17 deletions spyder_terminal/tests/test_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
os.path.dirname(__file__)))
LOCATION_SLASH = LOCATION.replace('\\', '/')

TERM_UP = 10000
TERM_UP = 20000
WINDOWS = os.name == 'nt'

EXIT = 'exit'
Expand Down Expand Up @@ -181,7 +181,7 @@ def test_terminal_paste(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

term = terminal.get_widget().get_current_term()
port = terminal.get_widget().port
Expand Down Expand Up @@ -210,7 +210,7 @@ def test_terminal_color(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

term = terminal.get_widget().get_current_term()
port = terminal.get_widget().port
Expand All @@ -224,15 +224,15 @@ def test_terminal_find(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

term = terminal.get_widget().get_current_term()
port = terminal.get_widget().port
status_code = requests.get('http://127.0.0.1:{}'.format(port)).status_code
assert status_code == 200

term.exec_cmd('ls')
qtbot_module.wait(1000)
qtbot_module.wait(2000)

# Search without any special parameters
text = 'ls'
Expand Down Expand Up @@ -269,7 +269,7 @@ def test_terminal_font(setup_terminal, qtbot_module):

qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

term = terminal.get_widget().get_current_term()
port = terminal.get_widget().port
Expand All @@ -293,7 +293,7 @@ def test_terminal_tab_title(setup_terminal, qtbot_module):

qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)
terminal.create_new_term()
terminal.create_new_term()
num_1 = int(terminal.get_widget().tabwidget.tabText(1)[-1])
Expand All @@ -311,7 +311,7 @@ def test_new_terminal(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

# Test if server is running
port = terminal.get_widget().port
Expand All @@ -320,7 +320,7 @@ def test_new_terminal(setup_terminal, qtbot_module):

terminal.create_new_term()
term = terminal.get_widget().get_current_term()
qtbot_module.wait(1000)
qtbot_module.wait(2000)
# Move to LOCATION
# qtbot_module.keyClicks(term.view, 'cd {}'.format(LOCATION))
# qtbot_module.keyPress(term.view, Qt.Key_Return)
Expand All @@ -334,9 +334,9 @@ def test_new_terminal(setup_terminal, qtbot_module):
# Run pwd
# qtbot_module.keyClicks(term.view, 'pwd')
# qtbot_module.keyPress(term.view, Qt.Key_Return)
qtbot_module.wait(3000)
qtbot_module.wait(4000)
term.exec_cmd(PWD)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

# Assert pwd is LOCATION
term.resize(900, 700)
Expand All @@ -360,12 +360,12 @@ def test_close_terminal_manually(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

terminal.create_new_term()
initial_num = len(terminal.get_widget().get_terms())
term = terminal.get_widget().get_current_term()
qtbot_module.wait(3000)
qtbot_module.wait(4000)

term.exec_cmd(EXIT)

Expand All @@ -386,7 +386,7 @@ def test_terminal_cwd(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

port = terminal.get_widget().port
status_code = requests.get('http://127.0.0.1:{}'.format(port)).status_code
Expand All @@ -403,7 +403,7 @@ def test_conda_path(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

term = terminal.get_widget().get_current_term()
# Check that conda list works
Expand All @@ -423,7 +423,7 @@ def test_zoom(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

term = terminal.get_widget().get_current_term()
original_zoom = term.get_conf("zoom")
Expand All @@ -447,7 +447,7 @@ def test_zoom_new_term(setup_terminal, qtbot_module):
terminal = setup_terminal
qtbot_module.waitUntil(
lambda: terminal.get_widget().server_is_ready(), timeout=TERM_UP)
qtbot_module.wait(1000)
qtbot_module.wait(2000)

term = terminal.get_widget().get_current_term()

Expand Down

0 comments on commit d979575

Please sign in to comment.