blob: ce5615b88908de17b55f6d3ac665d564fc76e136 [file] [log] [blame]
Michael Foord3ab34cc2010-12-03 12:27:40 +00001from test import regrtest, support
Michael Foordee4a5e02010-12-03 10:42:03 +00002
Michael Foordee4a5e02010-12-03 10:42:03 +00003
Michael Foord3ab34cc2010-12-03 12:27:40 +00004TEMPDIR, TESTCWD = regrtest._make_temp_dir_for_build(regrtest.TEMPDIR)
5regrtest.TEMPDIR = TEMPDIR
Michael Foordee4a5e02010-12-03 10:42:03 +00006regrtest.TESTCWD = TESTCWD
7
8# Run the tests in a context manager that temporary changes the CWD to a
9# temporary and writable directory. If it's not possible to create or
10# change the CWD, the original CWD will be used. The original CWD is
11# available from support.SAVEDCWD.
12with support.temp_cwd(TESTCWD, quiet=True):
13 regrtest.main()