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

gh-103088: Fix test error message #103500

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions Lib/test/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,9 @@ def test_activate_shell_script_has_no_dos_newlines(self):
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):
Expand Down