]> arthur.barton.de Git - bup.git/commitdiff
thelpers: adjust for python 3
authorRob Browning <rlb@defaultvalue.org>
Wed, 9 Oct 2019 06:17:06 +0000 (01:17 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 13 Oct 2019 17:41:16 +0000 (12:41 -0500)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Makefile
lib/bup/t/thelpers.py

index a44f7338adc37809f9aa03c675f890a2d60c55ee..f4d999bae21bd350b0187ca5f596363c067a7a19 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -160,6 +160,7 @@ ifeq "2" "$(bup_python_majver)"
     lib/bup/t/txstat.py
 else
   python_tests := \
+    lib/bup/t/thashsplit.py \
     lib/bup/t/toptions.py \
     lib/bup/t/tshquote.py \
     lib/bup/t/tvint.py
index e0ef21fd5098c25963b55ef7eb1858b99ac6d084..d9f470480f142d5ec10e33a22b34e4ed936fcaa6 100644 (file)
@@ -103,7 +103,7 @@ def test_grafted_path_components():
 def test_readpipe():
     with no_lingering_errors():
         x = readpipe(['echo', '42'])
-        WVPASSEQ(x, '42\n')
+        WVPASSEQ(x, b'42\n')
         try:
             readpipe(['bash', '-c', 'exit 42'])
         except Exception as ex:
@@ -116,10 +116,10 @@ def test_batchpipe():
     with no_lingering_errors():
         for chunk in batchpipe(['echo'], []):
             WVPASS(False)
-        out = ''
+        out = b''
         for chunk in batchpipe(['echo'], ['42']):
             out += chunk
-        WVPASSEQ(out, '42\n')
+        WVPASSEQ(out, b'42\n')
         try:
             batchpipe(['bash', '-c'], ['exit 42'])
         except Exception as ex:
@@ -131,12 +131,12 @@ def test_batchpipe():
         arg_max = \
             helpers._argmax_base(['echo']) + helpers._argmax_args_size(args[:3])
         batches = batchpipe(['echo'], args, arg_max=arg_max)
-        WVPASSEQ(next(batches), '0 1 2\n')
-        WVPASSEQ(next(batches), '3 4 5\n')
+        WVPASSEQ(next(batches), b'0 1 2\n')
+        WVPASSEQ(next(batches), b'3 4 5\n')
         WVPASSEQ(next(batches, None), None)
         batches = batchpipe(['echo'], [str(x) for x in range(5)], arg_max=arg_max)
-        WVPASSEQ(next(batches), '0 1 2\n')
-        WVPASSEQ(next(batches), '3 4\n')
+        WVPASSEQ(next(batches), b'0 1 2\n')
+        WVPASSEQ(next(batches), b'3 4\n')
         WVPASSEQ(next(batches, None), None)