]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/t/thelpers.py
helpers: add close_fds to exo
[bup.git] / lib / bup / t / thelpers.py
index c71cbb71a448b71257aec81649c583bda34d5ab6..17ee6357debac8960c9130a2ce6a5f1856a4ee17 100644 (file)
@@ -133,11 +133,9 @@ def test_readpipe():
         try:
             readpipe([b'bash', b'-c', b'exit 42'])
         except Exception as ex:
-            if not re.match("^subprocess b?'bash -c exit 42' failed with status 42$",
-                            str(ex)):
-                WVPASSEQ(str(ex),
-                         "^subprocess b?'bash -c exit 42' failed with status 42$")
-
+            rx = '^subprocess b?"bash -c \'exit 42\'" failed with status 42$'
+            if not re.match(rx, str(ex)):
+                WVPASSEQ(str(ex), rx)
 
 
 @wvtest