Skip to content

Commit

Permalink
Generate the list of projects locally, eliminating dependence on the …
Browse files Browse the repository at this point in the history
…network and reliance on the file location for running tests.
  • Loading branch information
jaraco committed Feb 29, 2024
1 parent e628e46 commit 93f2bb5
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,23 @@ def git_url_substitutions(fake_process):


@pytest.fixture(autouse=True)
def published_projects(monkeypatch):
def published_projects(monkeypatch, tmp_path):
"""
Generate a project list and set the environment variable.
"""
projects = tmp_path / 'projects.txt'
sample_projects = [
'/pmxbot/pmxbot.nsfw',
'/pypa/setuptools [lifted]',
'/python/cpython [fork]',
'jaraco.develop',
'keyring [lifted]',
'keyrings.firefox',
]
projects.write_text('\n'.join(sample_projects), encoding='utf-8')
monkeypatch.setenv(
'PROJECTS_LIST_URL',
'https://raw.githubusercontent.com/jaraco/dotfiles/main/projects.txt',
f'file://{projects}',
)


Expand Down

0 comments on commit 93f2bb5

Please sign in to comment.