diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2021-10-28 16:14:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 16:14:37 (GMT) |
commit | 13d9205f4057eeeef80a25d410ad123876dc60cd (patch) | |
tree | 18cbd8603e3f3a29d9f40a0bd8a4648356c205c9 /Lib/test/support | |
parent | 7f61d9d84843e3445f62eb00c47902f0daa30a72 (diff) | |
download | cpython-13d9205f4057eeeef80a25d410ad123876dc60cd.zip cpython-13d9205f4057eeeef80a25d410ad123876dc60cd.tar.gz cpython-13d9205f4057eeeef80a25d410ad123876dc60cd.tar.bz2 |
bpo-45629: Add a test for the "freeze" tool. (gh-29222)
The "freeze" tool has been part of the repo for a long time. However, it hasn't had any tests in the test suite to guard against regressions. We add such a test here. This is especially important as there has been a lot of change recently related to frozen modules, with more to come.
Note that as part of the test we build Python out-of-tree and install it in a temp dir.
https://bugs.python.org/issue45629
Diffstat (limited to 'Lib/test/support')
-rw-r--r-- | Lib/test/support/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 85fd741..fc3c99e 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -372,6 +372,17 @@ def requires_mac_ver(*min_version): return decorator +def skip_if_buildbot(reason=None): + """Decorator raising SkipTest if running on a buildbot.""" + if not reason: + reason = 'not suitable for buildbots' + if sys.platform == 'win32': + isbuildbot = os.environ.get('USERNAME') == 'Buildbot' + else: + isbuildbot = os.environ.get('USER') == 'buildbot' + return unittest.skipIf(isbuildbot, reason) + + def system_must_validate_cert(f): """Skip the test on TLS certificate validation failures.""" @functools.wraps(f) |