mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
dont close runtimes
This commit is contained in:
parent
505b47380f
commit
4b743e90e2
@ -42,7 +42,6 @@ def test_bash_command_pexcept(temp_dir, box_class, run_as_openhands):
|
||||
), 'The observation should be a CmdOutputObservation.'
|
||||
assert obs.exit_code == 0, 'The exit code should be 0.'
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -56,7 +55,6 @@ def test_single_multiline_command(temp_dir, box_class):
|
||||
assert obs.exit_code == 0, 'The exit code should be 0.'
|
||||
assert 'foo' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -70,7 +68,6 @@ def test_multiline_echo(temp_dir, box_class):
|
||||
assert obs.exit_code == 0, 'The exit code should be 0.'
|
||||
assert 'hello\r\nworld' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -85,7 +82,6 @@ def test_runtime_whitespace(temp_dir, box_class):
|
||||
assert obs.exit_code == 0, 'The exit code should be 0.'
|
||||
assert '\r\n\r\n\r\n' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -137,7 +133,6 @@ world "
|
||||
assert 'hello\r\nworld\r\nare\r\nyou\r\n\r\nthere?' in obs.content
|
||||
assert 'hello\r\nworld "\r\n' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -153,7 +148,6 @@ def test_no_ps2_in_output(temp_dir, box_class, run_as_openhands):
|
||||
assert 'hello\r\nworld' in obs.content
|
||||
assert '>' not in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -196,7 +190,6 @@ echo "success"
|
||||
assert obs.exit_code == 0, 'The exit code should be 0.'
|
||||
assert 'success' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -255,7 +248,6 @@ def test_cmd_run(temp_dir, box_class, run_as_openhands):
|
||||
assert isinstance(obs, CmdOutputObservation)
|
||||
assert obs.exit_code == 0
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -273,7 +265,6 @@ def test_run_as_user_correct_home_dir(temp_dir, box_class, run_as_openhands):
|
||||
else:
|
||||
assert '/root' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -289,7 +280,6 @@ def test_multi_cmd_run_in_single_line(temp_dir, box_class):
|
||||
assert '/workspace' in obs.content
|
||||
assert 'total 0' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -318,7 +308,6 @@ def test_stateful_cmd(temp_dir, box_class):
|
||||
assert obs.exit_code == 0, 'The exit code should be 0.'
|
||||
assert '/workspace/test' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -332,7 +321,6 @@ def test_failed_cmd(temp_dir, box_class):
|
||||
assert isinstance(obs, CmdOutputObservation)
|
||||
assert obs.exit_code != 0, 'The exit code should not be 0 for a failed command.'
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -365,7 +353,6 @@ def test_copy_single_file(temp_dir, box_class):
|
||||
assert obs.exit_code == 0
|
||||
assert 'Hello, World!' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -414,7 +401,6 @@ def test_copy_directory_recursively(temp_dir, box_class):
|
||||
assert obs.exit_code == 0
|
||||
assert 'File 1 content' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -435,7 +421,6 @@ def test_copy_to_non_existent_directory(temp_dir, box_class):
|
||||
assert obs.exit_code == 0
|
||||
assert 'Hello, World!' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -470,7 +455,6 @@ def test_overwrite_existing_file(temp_dir, box_class):
|
||||
assert obs.exit_code == 0
|
||||
assert 'Hello, World!' in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -490,7 +474,6 @@ def test_copy_non_existent_file(temp_dir, box_class):
|
||||
assert isinstance(obs, CmdOutputObservation)
|
||||
assert obs.exit_code != 0 # File should not exist
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -517,7 +500,6 @@ def test_keep_prompt(box_class, temp_dir):
|
||||
assert obs.exit_code == 0
|
||||
assert 'root@' not in obs.content
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
@ -596,7 +578,4 @@ def test_git_operation(box_class):
|
||||
assert isinstance(obs, CmdOutputObservation)
|
||||
assert obs.exit_code == 0
|
||||
|
||||
runtime.close()
|
||||
|
||||
runtime.close()
|
||||
time.sleep(1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user