Add an optional command-line argument (second) to `testrunner.py`: the
test file name pattern. You can use this argument to run only specific
files in a given test directory, instead of the default which is
`test*.py`.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
if __name__ == '__main__':
loader = unittest.TestLoader()
- tests = loader.discover(sys.argv[1])
+
+ if len(sys.argv) >= 3:
+ pattern = sys.argv[2]
+ else:
+ pattern = 'test*.py'
+
+ tests = loader.discover(sys.argv[1], pattern)
runner = TAPTestRunner()
runner.set_stream(True)
runner.set_format('{method_name}')