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

Fix use of FakeRepository in tests that change current dir #1517

Merged
merged 1 commit into from
Oct 27, 2021
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
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
make_install_requirement,
)

from .constants import MINIMAL_WHEELS_PATH
from .constants import MINIMAL_WHEELS_PATH, TEST_DATA_PATH
from .utils import looks_like_ci


class FakeRepository(BaseRepository):
def __init__(self):
with open("tests/test_data/fake-index.json") as f:
with open(os.path.join(TEST_DATA_PATH, "fake-index.json")) as f:
self.index = json.load(f)

with open("tests/test_data/fake-editables.json") as f:
with open(os.path.join(TEST_DATA_PATH, "fake-editables.json")) as f:
self.editables = json.load(f)

def get_hashes(self, ireq):
Expand Down