Skip to content

Commit e658599

Browse files
committed
Add utf-8 encoding in test_packageindex
1 parent bff5e77 commit e658599

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

setuptools/tests/test_packageindex.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import urllib.request
33
import urllib.error
44
import http.client
5+
from inspect import cleandoc
56
from unittest import mock
67

78
import pytest
89

910
import setuptools.package_index
10-
from .textwrap import DALS
1111

1212

1313
class TestPackageIndex:
@@ -257,14 +257,15 @@ class TestPyPIConfig:
257257
def test_percent_in_password(self, tmp_home_dir):
258258
pypirc = tmp_home_dir / '.pypirc'
259259
pypirc.write_text(
260-
DALS(
260+
cleandoc(
261261
"""
262-
[pypi]
263-
repository=https://pypi.org
264-
username=jaraco
265-
password=pity%
266-
"""
267-
)
262+
[pypi]
263+
repository=https://pypi.org
264+
username=jaraco
265+
password=pity%
266+
"""
267+
),
268+
encoding="utf-8",
268269
)
269270
cfg = setuptools.package_index.PyPIConfig()
270271
cred = cfg.creds_by_repository['https://pypi.org']

0 commit comments

Comments
 (0)