Skip to content

Commit

Permalink
Replace tmpdir_cwd fixture with tmp_path
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Jan 1, 2021
1 parent 7aa2406 commit 6f85928
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions setuptools/tests/test_build_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,11 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd):
""")
}

def test_build_sdist_relative_path_import(self, tmpdir_cwd):
build_files(self._relative_path_import_files)
build_backend = self.get_build_backend()
with pytest.raises(ImportError):
def test_build_sdist_relative_path_import(self, tmp_path):
build_files(self._relative_path_import_files, prefix=str(tmp_path))
build_backend = self.get_build_backend(cwd_path=tmp_path)
with pytest.raises(ImportError, match="^No module named 'hello'$"):
build_backend.build_sdist("temp")
build_backend.build_sdist(tmp_path / "temp")

@pytest.mark.parametrize('setup_literal, requirements', [
("'foo'", ['foo']),
Expand Down

0 comments on commit 6f85928

Please sign in to comment.