STINNER Victor added the comment:
+ @unittest.skipIf(sysconfig.get_config_var('ANDROID_API_LEVEL') == 0,
+ "not an android platform")
+ def test_is_android(self):
+ # Use an heuristic, the shell on Android is at /system/bin/sh.
+ proc = subprocess.run(['/system/bin/sh', '-c', 'echo OK'],
+ stdout=subprocess.PIPE)
+ self.assertIn(b'OK', proc.stdout)
I dislike such functional test, it might fail and might need maintaince.
I suggest to push the change without the unit test.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27442>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com