summaryrefslogtreecommitdiff
path: root/Lib/test/__main__.py
blob: ce5615b88908de17b55f6d3ac665d564fc76e136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from test import regrtest, support


TEMPDIR, TESTCWD = regrtest._make_temp_dir_for_build(regrtest.TEMPDIR)
regrtest.TEMPDIR = TEMPDIR
regrtest.TESTCWD = TESTCWD

# Run the tests in a context manager that temporary changes the CWD to a
# temporary and writable directory. If it's not possible to create or
# change the CWD, the original CWD will be used. The original CWD is
# available from support.SAVEDCWD.
with support.temp_cwd(TESTCWD, quiet=True):
    regrtest.main()