summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-13 09:03:34 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-13 09:03:34 (GMT)
commitf852fff878a578bef805310b0bfb7cbd1980e689 (patch)
tree9fb229ee7564718ff5aea9141850ac75ca8e1297 /Lib/test/support
parentd0c2b5b0ae8ea2d727c965840fa35dfdc7fecce1 (diff)
parent3a4e989324cc1f75c9f749c9e1c20de2f43df6e3 (diff)
downloadcpython-f852fff878a578bef805310b0bfb7cbd1980e689.zip
cpython-f852fff878a578bef805310b0bfb7cbd1980e689.tar.gz
cpython-f852fff878a578bef805310b0bfb7cbd1980e689.tar.bz2
Issue #28759: Merge 3.6.
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 6df48c0..bed76eb 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -93,7 +93,7 @@ __all__ = [
"check__all__", "requires_android_level", "requires_multiprocessing_queue",
# sys
"is_jython", "is_android", "check_impl_detail", "unix_shell",
- "setswitchinterval",
+ "setswitchinterval", "android_not_root",
# network
"HOST", "IPV6_ENABLED", "find_unused_port", "bind_port", "open_urlresource",
# processes
@@ -774,6 +774,7 @@ try:
except AttributeError:
# sys.getandroidapilevel() is only available on Android
is_android = False
+android_not_root = (is_android and os.geteuid() != 0)
if sys.platform != 'win32':
unix_shell = '/system/bin/sh' if is_android else '/bin/sh'