deathbeds / importnb

notebook files as source
https://importnb.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
68 stars 5 forks source link

kick py3.13 #159

Open tonyfast opened 1 month ago

bollwyvl commented 2 weeks ago

A nickle fix for the current test issue:

diff --git a/docs/test_cli.py b/docs/test_cli.py
index 6111e0e..71c45a3 100644
--- a/docs/test_cli.py
+++ b/docs/test_cli.py
@@ -1,3 +1,4 @@
+import re
 from pathlib import Path
 from subprocess import check_call
 from sys import executable, path, version_info
@@ -44,7 +45,10 @@ def cli_test(command):

             if "UserWarning: Attempting to work in a virtualenv." in out:
                 out = "".join(out.splitlines(True)[2:])
-            assert out == match
+
+            out_stripped = re.sub(r"\s+", " ", out)
+            match_stripped = re.sub(r"\s+", " ", out)
+            assert out_stripped == match_stripped

         return wrapper