Skip to content

Commit

Permalink
Fix test error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Zabolekar committed Apr 13, 2023
1 parent 59e0de4 commit bf3c063
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit bf3c063

Please sign in to comment.