@@ -812,7 +812,6 @@ def check_cwd():
812
812
sys .platform .startswith ("linux" ) and running_in_ci (),
813
813
reason = 'Fails sometimes on Linux and CIs'
814
814
)
815
- @pytest .mark .skipif (sys .platform == "darwin" , reason = "Fails sometimes on Mac" )
816
815
@pytest .mark .close_main_window
817
816
def test_dedicated_consoles (main_window , qtbot ):
818
817
"""Test running code in dedicated consoles."""
@@ -822,7 +821,7 @@ def test_dedicated_consoles(main_window, qtbot):
822
821
timeout = SHELL_TIMEOUT ,
823
822
)
824
823
825
- # ---- Load test file - ---
824
+ # --- Load test file ---
826
825
test_file = osp .join (LOCATION , 'script.py' )
827
826
main_window .editor .load (test_file )
828
827
code_editor = main_window .editor .get_focus_widget ()
@@ -915,7 +914,13 @@ def test_dedicated_consoles(main_window, qtbot):
915
914
# --- Assert runfile text is present after reruns ---
916
915
assert 'runfile' in control .toPlainText ()
917
916
918
- # ---- Closing test file and resetting config ----
917
+ # --- Assert no re-execution when already executing
918
+ shell .execute ("import time; time.sleep(5)" ) # Execute something long
919
+ qtbot .keyClick (code_editor , Qt .Key_F5 ) # Try to execute while busy
920
+ qtbot .wait (6000 ) # First exectution should be done
921
+ assert not shell .is_defined ("zz" ) # Second execution did not occur
922
+
923
+ # --- Closing test file and resetting config ---
919
924
main_window .editor .close_file ()
920
925
CONF .set ('run' , 'configurations' , {})
921
926
CONF .set ('run' , 'last_used_parameters_per_executor' , {})
0 commit comments