Skip to content

Commit

Permalink
Fixing linter issues as well as issues with the newer versio of python
Browse files Browse the repository at this point in the history
  • Loading branch information
microcat49 committed Apr 15, 2021
1 parent a375dbc commit b6db3f9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
7 changes: 5 additions & 2 deletions tests/conftest.py
Expand Up @@ -43,8 +43,11 @@ def __init__(self):

with open("tests/test_data/fake-editables.json") as f:
self.editables = json.load(f)
self.editables[eval(self.editables['func'])] = []
print(self.editables)
self.editables[
self.editables["fake_with_local_files"].format(
os.path.join(PACKAGES_PATH)
)
] = []

def get_hashes(self, ireq):
# Some fake hashes
Expand Down
1 change: 0 additions & 1 deletion tests/constants.py
Expand Up @@ -4,4 +4,3 @@
MINIMAL_WHEELS_PATH = os.path.join(TEST_DATA_PATH, "minimal_wheels")
PACKAGES_PATH = os.path.join(TEST_DATA_PATH, "packages")
NON_LINKED_PACKAGES_PATH = os.path.join(TEST_DATA_PATH, "non_linked_wheel_file")

2 changes: 1 addition & 1 deletion tests/test_data/fake-editables.json
@@ -1,5 +1,5 @@
{
"git+git://example.org/django.git#egg=django": [],
"git+https://github.com/celery/billiard#egg=billiard==3.5.9999": [],
"func" : "\"file://localhost/{}/fake_with_local_files/setup.py\".format(os.path.join(PACKAGES_PATH))"
"fake_with_local_files": "file://localhost/{}/fake_with_local_files/setup.py"
}
6 changes: 3 additions & 3 deletions tests/test_data/packages/fake_with_local_files/setup.py
@@ -1,15 +1,15 @@
import os

from setuptools import setup

from .constants import NON_LINKED_PACKAGES_PATH

setup(
name="fake with local files as dependencies",
version=0.1,
install_requires=[
'fake_package_a @ file://localhost/{}/fake_package_a-0.1-py2.py3-none-any.whl'.format(
"fake_package_a @ file://localhost/{}/fake_package_a-0.1-py2.py3-none-any.whl".format(
os.path.join(NON_LINKED_PACKAGES_PATH)
)
],
)


10 changes: 6 additions & 4 deletions tests/test_resolver.py
@@ -1,8 +1,10 @@
import os

import pytest

from piptools.exceptions import NoCandidateFound
from piptools.resolver import RequirementSummary, combine_install_requirements

from .constants import PACKAGES_PATH


Expand All @@ -27,13 +29,13 @@
"fake_package_a @ file://localhost/{}/fake_with_local_files/setup.py".format(
os.path.join(PACKAGES_PATH)
)
],
],
[
"fake_package_a@ file://localhost/{}/fake_with_local_files/setup.py "\
"from file://localhost/{}/fake_with_local_files/setup.py".format(
"fake_package_a@ file://localhost/{}/fake_with_local_files/setup.py "
"from file://localhost/{}/fake_with_local_files/setup.py".format(
os.path.join(PACKAGES_PATH), os.path.join(PACKAGES_PATH)
)
]
],
),
(["Jinja2", "markupsafe"], ["jinja2==2.7.3", "markupsafe==0.23"]),
# We should return a normal release version if prereleases is False
Expand Down

0 comments on commit b6db3f9

Please sign in to comment.