use tmp_path instead of tmpdir

This commit is contained in:
David Lord 2023-05-02 10:38:27 -07:00
parent 1d7281fe07
commit 0a00e1b608
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 59 additions and 64 deletions

View file

@ -218,8 +218,8 @@ class TestNoImports:
imp modules in the Python standard library.
"""
def test_name_with_import_error(self, modules_tmpdir):
modules_tmpdir.join("importerror.py").write("raise NotImplementedError()")
def test_name_with_import_error(self, modules_tmp_path):
(modules_tmp_path / "importerror.py").write_text("raise NotImplementedError()")
try:
flask.Flask("importerror")
except NotImplementedError: