|
@@ -456,3 +456,17 @@ def test_git_operation(box_class):
|
|
|
assert obs.exit_code == 0
|
|
assert obs.exit_code == 0
|
|
|
finally:
|
|
finally:
|
|
|
_close_test_runtime(runtime)
|
|
_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)
|