Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pytest pypi take 2 #5556

Merged
merged 8 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ sphinx = "==4.*"
sphinx-click = "==4.*"
sphinxcontrib-spelling = "==7.*"
click = "==8.0.3"
pytest_pypi = {path = "./tests/pytest-pypi", editable = true}
pypiserver = "==1.*"
stdeb = {version="*", markers="sys_platform == 'linux'"}
zipp = {version = "==3.6.0", markers = "python_version < '3.10'"}
Expand All @@ -20,6 +19,8 @@ typing-extensions = "==4.*"
waitress = {version = "*", markers="sys_platform == 'win32'"}
gunicorn = {version = "*", markers="sys_platform == 'linux'"}
parse = "*"
importlib-metadata = {version = "*", markers="python_version < '3.8'"}
colorama= {version = "*", markers="sys_platform == 'win32'"}

[packages]

Expand Down
345 changes: 133 additions & 212 deletions Pipfile.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pipenv/5556.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove pytest-pypi package since it's not used anymore
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ exclude = '''
| pipenv/vendor
| pipenv/patched
| tests/pypi
| tests/pytest-pypi
| tests/test_artifacts
| get-pipenv.py
| pyproject.toml
Expand Down Expand Up @@ -66,7 +65,6 @@ norecursedirs = [
"tasks",
"docs",
"tests/test_artifacts",
"tests/pytest-pypi",
"tests/pypi",
"peeps",
]
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
create_tracked_tempdir, handle_remove_readonly
)

from pytest_pypi.app import prepare_fixtures
from pytest_pypi.app import prepare_packages as prepare_pypi_packages
import pypiserver

log = logging.getLogger(__name__)
warnings.simplefilter("default", category=ResourceWarning)
cli_runner = CliRunner(mix_stderr=False)
Expand Down Expand Up @@ -98,8 +94,6 @@ def check_for_mercurial():
TESTS_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PYPI_VENDOR_DIR = os.path.join(TESTS_ROOT, 'pypi')
WE_HAVE_HG = check_for_mercurial()
prepare_fixtures(os.path.join(PYPI_VENDOR_DIR, "fixtures"))
prepare_pypi_packages(PYPI_VENDOR_DIR)


def pytest_runtest_setup(item):
Expand Down
16 changes: 12 additions & 4 deletions tests/integration/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import pytest

import pytest_pypi.app
from flaky import flaky
from pipenv.vendor.vistir.misc import to_text
from pipenv.utils.shell import temp_environ
Expand Down Expand Up @@ -64,12 +63,21 @@ def test_lock_includes_hashes_for_all_platforms(pipenv_instance_private_pypi):
""" Locking should include hashes for *all* platforms, not just the
platform we're running lock on. """

releases = pytest_pypi.app.packages['yarl'].releases
#releases = pytest_pypi.app.packages['yarl'].releases


releases = {'yarl-1.3.0-cp35-cp35m-manylinux1_x86_64.whl': '3890ab952d508523ef4881457c4099056546593fa05e93da84c7250516e632eb',
'yarl-1.3.0-cp35-cp35m-win_amd64.whl': 'b25de84a8c20540531526dfbb0e2d2b648c13fd5dd126728c496d7c3fea33310',
'yarl-1.3.0-cp36-cp36m-manylinux1_x86_64.whl': '5badb97dd0abf26623a9982cd448ff12cb39b8e4c94032ccdedf22ce01a64842',
'yarl-1.3.0-cp36-cp36m-win_amd64.whl': 'c6e341f5a6562af74ba55205dbd56d248daf1b5748ec48a0200ba227bb9e33f4',
'yarl-1.3.0-cp37-cp37m-win_amd64.whl': '73f447d11b530d860ca1e6b582f947688286ad16ca42256413083d13f260b7a0',
'yarl-1.3.0.tar.gz': '024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9',
}
def get_hash(release_name):
# Convert a specific filename to a hash like what would show up in a Pipfile.lock.
# For example:
# 'yarl-1.3.0-cp35-cp35m-manylinux1_x86_64.whl' -> 'sha256:3890ab952d508523ef4881457c4099056546593fa05e93da84c7250516e632eb'
return f"sha256:{releases[release_name].hash}"
return f"sha256:{releases[release_name]}"

with pipenv_instance_private_pypi() as p:
with open(p.pipfile_path, 'w') as f:
Expand Down Expand Up @@ -731,4 +739,4 @@ def test_pinned_pipfile_no_null_markers_when_extras(pipenv_instance_pypi):
assert c.returncode == 0
assert "dataclasses-json" in p.pipfile["packages"]
assert "dataclasses-json" in p.lockfile["default"]
assert "markers" not in p.lockfile["default"]["dataclasses-json"]
assert "markers" not in p.lockfile["default"]["dataclasses-json"]
5 changes: 0 additions & 5 deletions tests/pytest-pypi/DESCRIPTION.rst

This file was deleted.

4 changes: 0 additions & 4 deletions tests/pytest-pypi/MANIFEST.in

This file was deleted.

4 changes: 0 additions & 4 deletions tests/pytest-pypi/README.md

This file was deleted.

Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions tests/pytest-pypi/pyproject.toml

This file was deleted.

14 changes: 0 additions & 14 deletions tests/pytest-pypi/pytest_pypi/__init__.py

This file was deleted.

239 changes: 0 additions & 239 deletions tests/pytest-pypi/pytest_pypi/app.py

This file was deleted.

22 changes: 0 additions & 22 deletions tests/pytest-pypi/pytest_pypi/certs.py

This file was deleted.

Loading