8000 bpo-11594: Ensure line-endings are respected when using 2to3 by aaronang · Pull Request #6483 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-11594: Ensure line-endings are respected when using 2to3 #6483

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

Merged
merged 7 commits into from
Apr 17, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bpo-11594: Simplify test that ensures line-endings are respected
  • Loading branch information
aaronang committed Apr 16, 2018
commit 940dad172e52f5e418f4525a92e018dac1b8ca28
13 changes: 4 additions & 9 deletions Lib/lib2to3/tests/test_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,10 @@ def test_crlf_newlines(self):
os.linesep = old_sep

def test_crlf_unchanged(self):
old_sep = os.linesep
os.linesep = "\n"
try:
fn = os.path.join(TEST_DATA_DIR, "crlf.py")
old, new = self.refactor_file(fn)
self.assertIn(b"\r\n", old)
self.assertIn(b"\r\n", new)
finally:
os.linesep = old_sep
fn = os.path.join(TEST_DATA_DIR, "crlf.py")
old, new = self.refactor_file(fn)
self.assertIn(b"\r\n", old)
self.assertIn(b"\r\n", new)

def test_refactor_docstring(self):
rt = self.rt()
Expand Down
0