mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
(enh) add test_python_version to test_bash.py runtime tests (#4098)
This commit is contained in:
parent
2bed3a424c
commit
575a829d94
@ -456,3 +456,17 @@ def test_git_operation(box_class):
|
||||
assert obs.exit_code == 0
|
||||
finally:
|
||||
_close_test_runtime(runtime)
|
||||
|
||||
|
||||
def test_python_version(temp_dir, box_class, run_as_openhands):
|
||||
runtime = _load_runtime(temp_dir, box_class, run_as_openhands)
|
||||
try:
|
||||
obs = runtime.run_action(CmdRunAction(command='python --version'))
|
||||
|
||||
assert isinstance(
|
||||
obs, CmdOutputObservation
|
||||
), 'The observation should be a CmdOutputObservation.'
|
||||
assert obs.exit_code == 0, 'The exit code should be 0.'
|
||||
assert 'Python 3' in obs.content, 'The output should contain "Python 3".'
|
||||
finally:
|
||||
_close_test_runtime(runtime)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user