Skip to content

Commit

Permalink
Test execute_code raises an AssertionError when neither code nor
Browse files Browse the repository at this point in the history
filename is provided.
  • Loading branch information
cipherself committed Oct 2, 2023
1 parent ca531bc commit c7f7821
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ def test_execute_code(use_docker=None):
assert isinstance(image, str) or docker is None or os.path.exists("/.dockerenv") or use_docker is False


def test_execute_code_raises_when_code_and_filename_are_both_none():
with pytest.raises(AssertionError):
execute_code(code=None, filename=None)


@pytest.mark.skipif(
sys.platform in ["darwin"],
reason="do not run on MacOS",
Expand Down

0 comments on commit c7f7821

Please sign in to comment.