summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorxdegaye <xdegaye@gmail.com>2017-11-29 10:43:23 (GMT)
committerGitHub <noreply@github.com>2017-11-29 10:43:23 (GMT)
commitef83806f5ec01f34f6cbf4ebb5752875b5961f7e (patch)
treed67ee31ba17b35dcf70adf2aa4daf12a960d2caf /Lib/test/support
parentcc55e78acab93a495c974b9a2ea71c8bb9cc2f5d (diff)
downloadcpython-ef83806f5ec01f34f6cbf4ebb5752875b5961f7e.zip
cpython-ef83806f5ec01f34f6cbf4ebb5752875b5961f7e.tar.gz
cpython-ef83806f5ec01f34f6cbf4ebb5752875b5961f7e.tar.bz2
bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV (GH-4604)
Remove the test.support.requires_android_level decorator.
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index e864896..42c41ff 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -87,7 +87,7 @@ __all__ = [
"bigmemtest", "bigaddrspacetest", "cpython_only", "get_attribute",
"requires_IEEE_754", "skip_unless_xattr", "requires_zlib",
"anticipate_failure", "load_package_tests", "detect_api_mismatch",
- "check__all__", "requires_android_level", "requires_multiprocessing_queue",
+ "check__all__", "requires_multiprocessing_queue",
"skip_unless_bind_unix_socket",
# sys
"is_jython", "is_android", "check_impl_detail", "unix_shell",
@@ -773,13 +773,7 @@ requires_lzma = unittest.skipUnless(lzma, 'requires lzma')
is_jython = sys.platform.startswith('java')
-try:
- # constant used by requires_android_level()
- _ANDROID_API_LEVEL = sys.getandroidapilevel()
- is_android = True
-except AttributeError:
- # sys.getandroidapilevel() is only available on Android
- is_android = False
+is_android = hasattr(sys, 'getandroidapilevel')
if sys.platform != 'win32':
unix_shell = '/system/bin/sh' if is_android else '/bin/sh'
@@ -1778,13 +1772,6 @@ def requires_resource(resource):
else:
return unittest.skip("resource {0!r} is not enabled".format(resource))
-def requires_android_level(level, reason):
- if is_android and _ANDROID_API_LEVEL < level:
- return unittest.skip('%s at Android API level %d' %
- (reason, _ANDROID_API_LEVEL))
- else:
- return _id
-
def cpython_only(test):
"""
Decorator for tests only applicable on CPython.