summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generated_cases.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_generated_cases.py')
-rw-r--r--Lib/test/test_generated_cases.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_generated_cases.py b/Lib/test/test_generated_cases.py
index 475d749..ea0c116 100644
--- a/Lib/test/test_generated_cases.py
+++ b/Lib/test/test_generated_cases.py
@@ -118,17 +118,19 @@ class TestGeneratedCases(unittest.TestCase):
with open(self.temp_output_filename) as temp_output:
lines = temp_output.readlines()
- while lines and lines[0].startswith("// "):
+ while lines and lines[0].startswith(("// ", "#", " #", "\n")):
lines.pop(0)
+ while lines and lines[-1].startswith(("#", "\n")):
+ lines.pop(-1)
actual = "".join(lines)
- # if actual.rstrip() != expected.rstrip():
+ # if actual.strip() != expected.strip():
# print("Actual:")
# print(actual)
# print("Expected:")
# print(expected)
# print("End")
- self.assertEqual(actual.rstrip(), expected.rstrip())
+ self.assertEqual(actual.strip(), expected.strip())
def test_inst_no_args(self):
input = """