diff --git a/tests/test_patch.py b/tests/test_patch.py index cbdaaec..577ee25 100644 --- a/tests/test_patch.py +++ b/tests/test_patch.py @@ -1426,8 +1426,7 @@ def test_svn_mixed_line_ends(self): self.assertEqual(results[0].header, expected_header) def test_huge_patch(self): - start_time = time.time() - text = """diff --git a/huge.file b/huge.file + text_parts = ["""diff --git a/huge.file b/huge.file index 0000000..1111111 100644 --- a/huge.file +++ a/huge.file @@ -1439,9 +1438,10 @@ def test_huge_patch(self): -44444444 +55555555 +66666666 -""" - for n in range(0, 1000000): - text += "+" + hex(n) + "\n" +"""] + text_parts.extend("+" + hex(n) + "\n" for n in range(0, 1000000)) + text = ''.join(text_parts) + start_time = time.time() result = list(wtp.patch.parse_patch(text)) self.assertEqual(1, len(result)) self.assertEqual(1000007, len(result[0].changes))