File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,9 @@ Run tests
7070Run the command::
7171
7272 python3 tests/test_matrix.py
73+ # add -v option for verbose mode
7374
7475To test one specific Python executable::
7576
7677 python3.6 tests/run_tests.py
78+ # add -v option for verbose mode
Original file line number Diff line number Diff line change 11#!/usr/bin/python3
22"""
3- Run tests suite.
3+ Run the test suite.
44
55Usage::
66
Original file line number Diff line number Diff line change 11#!/usr/bin/python3
2+ """
3+ Run the test suite on multiple Python versions.
4+
5+ Usage::
6+
7+ python3 test_matrix.py
8+ python3 test_matrix.py -v # verbose mode
9+ """
210import os .path
311import subprocess
412import sys
1523)
1624
1725
18- def test_python (python , run_tests ):
19- cmd = [python , run_tests ]
26+ def run_command (cmd ):
2027 proc = subprocess .Popen (cmd )
2128 proc .wait ()
2229 exitcode = proc .returncode
@@ -25,6 +32,8 @@ def test_python(python, run_tests):
2532
2633
2734def main ():
35+ verbose = "-v" in sys .argv [1 :]
36+
2837 run_tests = os .path .join (os .path .dirname (__file__ ), "run_tests.py" )
2938 tested = set ()
3039 for python in PYTHONS :
@@ -36,7 +45,10 @@ def main():
3645 if executable is tested :
3746 continue
3847
39- test_python (executable , run_tests )
48+ cmd = [executable , run_tests ]
49+ if verbose :
50+ cmd .append ('-v' )
51+ run_command (cmd )
4052 tested .add (executable )
4153
4254 print ()
You can’t perform that action at this time.
0 commit comments