diff --git a/tests/test-git-submodules.t b/tests/test-git-submodules.t
index 7a13f6fa2da425c56ac59483cfcc953098a0157f_dGVzdHMvdGVzdC1naXQtc3VibW9kdWxlcy50..0beb089157f8fa275b9a8785627318a15498e36b_dGVzdHMvdGVzdC1naXQtc3VibW9kdWxlcy50 100644
--- a/tests/test-git-submodules.t
+++ b/tests/test-git-submodules.t
@@ -20,7 +20,7 @@
   $ mkdir gitrepo2
   $ cd gitrepo2
 
-  $ rmpwd="import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')"
+  $ rmpwd="import sys; print(sys.stdin.read().replace('$(dirname $(pwd))/', ''))"
 different versions of git spell the dir differently. Older versions
 use the full path to the directory all the time, whereas newer
 version spell it sanely as it was given (eg . in a newer version,
diff --git a/tests/test-renames.t b/tests/test-renames.t
index 7a13f6fa2da425c56ac59483cfcc953098a0157f_dGVzdHMvdGVzdC1yZW5hbWVzLnQ=..0beb089157f8fa275b9a8785627318a15498e36b_dGVzdHMvdGVzdC1yZW5hbWVzLnQ= 100644
--- a/tests/test-renames.t
+++ b/tests/test-renames.t
@@ -36,7 +36,7 @@
   $ fn_git_commit -msubalpha
   $ cd ../gitrepo
 
-  $ rmpwd="import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')"
+  $ rmpwd="import sys; print(sys.stdin.read().replace('$(dirname $(pwd))/', ''))"
   $ clonefilt='s/Cloning into/Initialized empty Git repository in/;s/in .*/in .../'
 
   $ git submodule add ../gitsubmodule 2>&1 | python -c "$rmpwd" | sed "$clonefilt" | egrep -v '^done\.$'