Handle early wrapping in test_show_result
authorJeremy Stanley <fungi@yuggoth.org>
Sat, 19 Sep 2020 14:29:59 +0000 (14:29 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sat, 19 Sep 2020 14:29:59 +0000 (14:29 +0000)
When showing a Python module object, the included file path can
easily be long enough to wrap to the next line. Allow for line
breaks immediately before it in the test_show_result test where it
sometimes surfaces.

mudpy/tests/selftest.py

index f576532..6e130c3 100644 (file)
@@ -336,7 +336,7 @@ test_show_result = (
     (2, r"\r\n838102050\r\n.*> ", "show result 1/0"),
     (2, r"Your expression raised an exception.*division by zero.*> ",
      "show result mudpy"),
     (2, r"\r\n838102050\r\n.*> ", "show result 1/0"),
     (2, r"Your expression raised an exception.*division by zero.*> ",
      "show result mudpy"),
-    (2, r"<module 'mudpy' from .*> ", "show result re"),
+    (2, r"<module 'mudpy' from.*> ", "show result re"),
     (2, r"Your expression raised an exception.*name 're' is not defined.*> ",
      "show result universe"),
     (2, r"<mudpy\.misc\.Universe object at 0x.*> ", "show result actor"),
     (2, r"Your expression raised an exception.*name 're' is not defined.*> ",
      "show result universe"),
     (2, r"<mudpy\.misc\.Universe object at 0x.*> ", "show result actor"),