Skip to content

Commit

Permalink
Encode the pathname for better compatibility (spaces, windows drive l…
Browse files Browse the repository at this point in the history
…etters, etc).
  • Loading branch information
jaraco committed Feb 29, 2024
1 parent 2671b14 commit 4046f04
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import textwrap
import urllib.request

import pytest

Expand Down Expand Up @@ -36,10 +37,8 @@ def published_projects(monkeypatch, tmp_path):
'keyrings.firefox',
]
projects.write_text('\n'.join(sample_projects), encoding='utf-8')
monkeypatch.setenv(
'PROJECTS_LIST_URL',
f'file://{projects}',
)
url_path = urllib.request.pathname2url(str(projects))
monkeypatch.setenv('PROJECTS_LIST_URL', f'file://{url_path}')


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit 4046f04

Please sign in to comment.