Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/functional/workflows/python_pip/test_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,14 +902,14 @@ def test_setup_tar_gz_hyphens_in_name(self, osutils, sdist_reader):
# The whole reason we need to use the egg info to get the name and
# version is that we cannot deterministically parse that information
# from the filenames themselves. This test puts hyphens in the name
# and version which would break a simple ``split("-")`` attempt to get
# that information.
setup_py = self._SETUP_PY % (self._SETUPTOOLS, "foo-bar", "1.0-2b")
# which would break a simple ``split("-")`` attempt to get that
# information.
setup_py = self._SETUP_PY % (self._SETUPTOOLS, "foo-bar", "1.2b2")
with osutils.tempdir() as tempdir:
filepath = self._write_fake_sdist(setup_py, tempdir, "tar.gz")
name, version = sdist_reader.get_package_name_and_version(filepath)
assert name == "foo-bar"
assert version == "1.0-2b"
assert version == "1.2b2"

def test_setup_zip(self, osutils, sdist_reader):
setup_py = self._SETUP_PY % (self._SETUPTOOLS, "foo", "1.0")
Expand Down Expand Up @@ -944,20 +944,20 @@ def test_distutil_zip(self, osutils, sdist_reader):
assert version == "1.0"

def test_both_tar_gz(self, osutils, sdist_reader):
setup_py = self._SETUP_PY % (self._BOTH, "foo-bar", "1.0-2b")
setup_py = self._SETUP_PY % (self._BOTH, "foo-bar", "1.0b2")
with osutils.tempdir() as tempdir:
filepath = self._write_fake_sdist(setup_py, tempdir, "tar.gz")
name, version = sdist_reader.get_package_name_and_version(filepath)
assert name == "foo-bar"
assert version == "1.0-2b"
assert version == "1.0b2"

def test_both_tar_bz2(self, osutils, sdist_reader):
setup_py = self._SETUP_PY % (self._BOTH, "foo-bar", "1.0-2b")
setup_py = self._SETUP_PY % (self._BOTH, "foo-bar", "1.0b2")
with osutils.tempdir() as tempdir:
filepath = self._write_fake_sdist(setup_py, tempdir, "tar.bz2")
name, version = sdist_reader.get_package_name_and_version(filepath)
assert name == "foo-bar"
assert version == "1.0-2b"
assert version == "1.0b2"

def test_both_zip(self, osutils, sdist_reader):
setup_py = self._SETUP_PY % (self._BOTH, "foo", "1.0")
Expand Down