chiark / gitweb /
documentation: don't exclude trailing file whitespace in tests.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 26 Sep 2024 10:57:04 +0000 (12:57 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 28 Sep 2024 01:44:29 +0000 (03:44 +0200)
This makes it impossible to ensure that a template doesn't leave extra
newlines at the end.

documentation/test_doxygen/__init__.py
documentation/test_doxygen/contents_htmlonly_htmlinclude/warnings.html
documentation/test_python/__init__.py

index 36865fd0fd6b68fa04b43fef0de841537918a973..bdeb7089bc2526d6ca92a95756d3984b43a01107 100644 (file)
@@ -91,9 +91,9 @@ class BaseTestCase(unittest.TestCase):
     def actual_expected_contents(self, actual, expected = None):
         if not expected: expected = actual
         with open(os.path.join(self.path, expected)) as f:
-            expected_contents = f.read().strip()
+            expected_contents = f.read()
         with open(os.path.join(self.path, 'html', actual)) as f:
-            actual_contents = f.read().strip()
+            actual_contents = f.read()
         actual_contents = _normalize_hashes.sub('g'*33, actual_contents)
         expected_contents = _normalize_hashes.sub('g'*33, expected_contents)
         return actual_contents, expected_contents
index cc2980a1618a130c32c8623501751a24ca91c312..2db371b5ebe77617b8a3eb0b795ea533be7d3b01 100644 (file)
@@ -27,4 +27,4 @@
   </div>
 </article></main>
 </body>
-</html>
\ No newline at end of file
+</html>
index c8a3a6ca317c9073b663693d6c268ca05e9cb0fa..16b62a1fc1fe072d67c631b35433882348d57453 100644 (file)
@@ -98,9 +98,9 @@ class BaseTestCase(unittest.TestCase):
         if not expected: expected = actual
 
         with open(os.path.join(self.path, expected)) as f:
-            expected_contents = f.read().strip()
+            expected_contents = f.read()
         with open(os.path.join(self.path, 'output', actual)) as f:
-            actual_contents = f.read().strip()
+            actual_contents = f.read()
         return actual_contents, expected_contents
 
 # On top of the automagic of BaseTestCase this automatically sets INPUT_MODULES