Skip to content

Commit

Permalink
fixed skipping code execution in docker test if already runnning in a…
Browse files Browse the repository at this point in the history
… container (#1383)
  • Loading branch information
davorrunje authored Jan 23, 2024
1 parent 598a634 commit 0c5d6b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ def test_execute_code(use_docker=None):


@pytest.mark.skipif(
sys.platform in ["win32"] or (not is_docker_running() and not in_docker_container()), reason="docker is not running"
sys.platform in ["win32"] or (not is_docker_running()) or in_docker_container(),
reason="docker is not running or in docker container already",
)
def test_execute_code_with_custom_filename_on_docker():
exit_code, msg, image = execute_code("print('hello world')", filename="tmp/codetest.py", use_docker=True)
Expand All @@ -368,7 +369,8 @@ def test_execute_code_with_custom_filename_on_docker():


@pytest.mark.skipif(
sys.platform in ["win32"] or (not is_docker_running() and not in_docker_container()), reason="docker is not running"
sys.platform in ["win32"] or (not is_docker_running()) or in_docker_container(),
reason="docker is not running or in docker container already",
)
def test_execute_code_with_misformed_filename_on_docker():
exit_code, msg, image = execute_code(
Expand Down

0 comments on commit 0c5d6b2

Please sign in to comment.