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

test_packageindex.test_percent_in_password failing on Windows #2112

Closed
jaraco opened this issue May 15, 2020 · 0 comments
Closed

test_packageindex.test_percent_in_password failing on Windows #2112

jaraco opened this issue May 15, 2020 · 0 comments

Comments

@jaraco
Copy link
Member

jaraco commented May 15, 2020

After adding support for Windows on Azure Pipelines in 6463fee, the tests started failing.

___________________ TestPyPIConfig.test_percent_in_password ___________________

self = <setuptools.tests.test_packageindex.TestPyPIConfig object at 0x0000025DA93BBFA0>
tmpdir = local('C:\\Users\\VssAdministrator\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-0\\test_percent_in_password0')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x0000025DAB1E8850>

    def test_percent_in_password(self, tmpdir, monkeypatch):
        monkeypatch.setitem(os.environ, 'HOME', str(tmpdir))
        pypirc = tmpdir / '.pypirc'
        pypirc.write(DALS("""
            [pypi]
            repository=https://pypi.org
            username=jaraco
            password=pity%
        """))
        print(os.path.expanduser('~'))
        print(str(tmpdir))
        cfg = setuptools.package_index.PyPIConfig()
>       cred = cfg.creds_by_repository['https://pypi.org']
E       KeyError: 'https://pypi.org'

setuptools\tests\test_packageindex.py:299: KeyError

I traced the issue to bpo-36264 where it seems that Python removed support for overriding the home directory on Windows through the HOME variable, now requiring a separate variable.

@jaraco jaraco closed this as completed in f866311 May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant