mirror of https://github.com/python/cpython
gh-103088: Fix test_venv error message to avoid bytes/str warning (GH-103500)
This commit is contained in:
parent
70e0a28bed
commit
4307feaddc
|
@ -623,8 +623,9 @@ class BasicTest(BaseTest):
|
|||
script_path = venv_dir / scripts_dir / "activate"
|
||||
venv.create(venv_dir)
|
||||
with open(script_path, 'rb') as script:
|
||||
for line in script:
|
||||
self.assertFalse(line.endswith(b'\r\n'), line)
|
||||
for i, line in enumerate(script, 1):
|
||||
error_message = f"CR LF found in line {i}"
|
||||
self.assertFalse(line.endswith(b'\r\n'), error_message)
|
||||
|
||||
@requireVenvCreate
|
||||
class EnsurePipTest(BaseTest):
|
||||
|
|
Loading…
Reference in New Issue