summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLib/test/regrtest.py4
-rw-r--r--Lib/test/support.py3
2 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 0c01cd2..0ee8bcc 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1227,11 +1227,9 @@ if __name__ == '__main__':
# much of the testing framework relies on the globals in the
# test.support module.
mydir = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
- i = pathlen = len(sys.path)
+ i = len(sys.path)
while i >= 0:
i -= 1
if os.path.abspath(os.path.normpath(sys.path[i])) == mydir:
del sys.path[i]
- if len(sys.path) == pathlen:
- print('Could not find %r in sys.path to remove it' % mydir)
main()
diff --git a/Lib/test/support.py b/Lib/test/support.py
index f916f4a..5b4cc5b 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -857,7 +857,8 @@ def _run_suite(suite):
elif len(result.failures) == 1 and not result.errors:
err = result.failures[0][1]
else:
- err = "errors occurred; run in verbose mode for details"
+ err = "multiple errors occurred"
+ if not verbose: err += "; run in verbose mode for details"
raise TestFailed(err)