]> granicus.if.org Git - python/commitdiff
Issue #27027: Added test.support.is_android that is True when this is an
authorXavier de Gaye <xdegaye@users.sourceforge.net>
Sun, 10 Jul 2016 16:20:15 +0000 (18:20 +0200)
committerXavier de Gaye <xdegaye@users.sourceforge.net>
Sun, 10 Jul 2016 16:20:15 +0000 (18:20 +0200)
Android build.

Lib/test/support/__init__.py
Misc/NEWS

index ef6b4f505de2c864de5ccf14e5aed609b5955da0..2b2966876fd8fccf044ecfaf517efbee6936bc25 100644 (file)
@@ -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
index b7ecaf762a5fd5d0d237745caedc8b93bb2dcf0c..6c646b6f486550b0ac4533453f5170591023165f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -167,6 +167,12 @@ Documentation
 - Issue #27285: Update documentation to reflect the deprecation of ``pyvenv``
   and normalize on the term "virtual environment". Patch by Steve Piercy.
 
+Tests
+-----
+
+- Issue #27027: Added test.support.is_android that is True when this is an
+  Android build.
+
 
 What's New in Python 3.6.0 alpha 2
 ==================================