Skip to content

Commit

Permalink
fix: patch getsize in the examples unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Jan 2, 2025
1 parent 7b442eb commit 870121c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_examples(self):
module = importlib.util.module_from_spec(spec)
sys.modules["test_module"] = module

with patch("builtins.open", new_callable=mock_open) as mocked_file:
with patch("os.path.getsize", return_value=0), patch("builtins.open", new_callable=mock_open) as mocked_file:
spec.loader.exec_module(module)
h = mocked_file.return_value.__enter__()
call_args_list = h.write.call_args_list
Expand Down

0 comments on commit 870121c

Please sign in to comment.