mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Add --tempdir option for test run (GH-10322)
This commit is contained in:
parent
5a087d5401
commit
38df97a03c
3 changed files with 9 additions and 11 deletions
|
|
@ -271,7 +271,8 @@ def _create_parser():
|
|||
group.add_argument('--junit-xml', dest='xmlpath', metavar='FILENAME',
|
||||
help='writes JUnit-style XML results to the specified '
|
||||
'file')
|
||||
|
||||
group.add_argument('--tempdir', dest='tempdir', metavar='PATH',
|
||||
help='override the working directory for the test run')
|
||||
return parser
|
||||
|
||||
|
||||
|
|
@ -383,8 +384,7 @@ def _parse_args(args, **kwargs):
|
|||
if ns.match_filename:
|
||||
if ns.match_tests is None:
|
||||
ns.match_tests = []
|
||||
filename = os.path.join(support.SAVEDCWD, ns.match_filename)
|
||||
with open(filename) as fp:
|
||||
with open(ns.match_filename) as fp:
|
||||
for line in fp:
|
||||
ns.match_tests.append(line.strip())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue