Skip to content

Commit

Permalink
fix test on older python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Mar 25, 2024
1 parent 69f57f8 commit b047018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_py38_support(self):
def test_filenotfound(self):
exc = FileNotFoundError()
exc.filename = "FILENAME"
with mock.patch("importlib.resources.as_file", side_effect=exc):
with mock.patch("importlib.resources.as_file", create=True, side_effect=exc):
res = DottedFileNameFinder().get_dotted_filename('tg.tests_test_filenotfound')
assert res == os.path.abspath("FILENAME")

Expand Down

0 comments on commit b047018

Please sign in to comment.