Skip to content

Commit 2c4944c

Browse files
committed
fix: test wrong on windows
Signed-off-by: yihong0618 <[email protected]>
1 parent 4cae1c2 commit 2c4944c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_pydoc/test_pydoc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,8 @@ def mock_getline(prompt):
21792179
with unittest.mock.patch.object(helper, "getline", mock_getline):
21802180
helper.interact()
21812181

2182-
return output.getvalue().split(os.linesep)
2182+
# handle different line endings across platforms consistently
2183+
return output.getvalue().splitlines(keepends=False) + ['']
21832184

21842185
def test_keywords(self):
21852186
self.assertEqual(sorted(pydoc.Helper.keywords),

0 commit comments

Comments
 (0)