diff options
author | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-07-10 18:20:15 +0200 |
---|---|---|
committer | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-07-10 18:20:15 +0200 |
commit | efda837b76bfe4c64accab28be0c026b195b2a9c (patch) | |
tree | 9345051be41c3ffdc655bdbd0c65fc5ada6bf581 /Lib/test/support | |
parent | 44e3515f3c002178b09c2e3807da1b9ce198a208 (diff) | |
download | cpython-efda837b76bfe4c64accab28be0c026b195b2a9c.tar.gz |
Issue #27027: Added test.support.is_android that is True when this is an
Android build.
Diffstat (limited to 'Lib/test/support')
-rw-r--r-- | Lib/test/support/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index ef6b4f505d..2b2966876f 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -92,7 +92,7 @@ __all__ = [ "anticipate_failure", "load_package_tests", "detect_api_mismatch", "check__all__", # sys - "is_jython", "check_impl_detail", + "is_jython", "is_android", "check_impl_detail", # network "HOST", "IPV6_ENABLED", "find_unused_port", "bind_port", "open_urlresource", # processes @@ -734,6 +734,8 @@ requires_lzma = unittest.skipUnless(lzma, 'requires lzma') is_jython = sys.platform.startswith('java') +is_android = bool(sysconfig.get_config_var('ANDROID_API_LEVEL')) + # Filename used for testing if os.name == 'java': # Jython disallows @ in module names |