summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-09-18 11:08:05 -0700
committerThomas Kluyver <takowl@gmail.com>2013-09-18 11:08:05 -0700
commit18ee3507e8a8f054b64cfe2bc433bb4b58b10b3e (patch)
tree74e92587e28be0984ff617cffb22a7327811c706 /tools
parent608a07766363a664d710d49141f6ba1baa3e7213 (diff)
downloadpexpect-18ee3507e8a8f054b64cfe2bc433bb4b58b10b3e.tar.gz
Python 3 support in test_winsize
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testall.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/testall.py b/tools/testall.py
index 28307c7..49263a5 100755
--- a/tools/testall.py
+++ b/tools/testall.py
@@ -27,14 +27,14 @@ PEXPECT LICENSE
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
'''
+from __future__ import print_function
import unittest
import os, os.path
import sys
import pexpect
-print "Testing pexpect version:", pexpect.__version__
-print "Testing pexpect revision:", pexpect.__revision__
+print("Testing pexpect version:", pexpect.__version__)
def add_tests_to_list (import_list, dirname, names):
# Only check directories named 'tests'.
@@ -51,11 +51,13 @@ def add_tests_to_list (import_list, dirname, names):
def find_modules_and_add_paths (root_path):
import_list = []
module_list = []
- os.path.walk (root_path, add_tests_to_list, import_list)
+ for (dirpath, dirnames, filenames) in os.walk(root_path):
+ add_tests_to_list(import_list, dirpath, filenames)
+
for module_file in import_list:
path, module = os.path.split(module_file)
module_list.append (module)
- print 'Adding:', module_file
+ print('Adding:', module_file)
if not path in sys.path:
sys.path.append (path)
if not os.path.dirname(path) in sys.path: