Xavier de Gaye added the comment:
In sysconfig.parse_config_h(), the variables in pyconfig.h that have a
commented-out '#undef' line are set to 0. Fortunately, there is no Android API
level 0.
Checking '== 0' ensures that autoreconf has been run to add '#undef
ANDROID_API_LEVEL' to pyconfig.h.in. If this autoreconf step were to be missed,
the test would (correctly) fail on the buildbots that are not Android as
get_config_var() would return None then and the test would not be skipped and
fail.
Most of the tests in the Python test suite do check 'not
sysconfig.get_config_var()' instead, except:
Lib/test/test_cmath.py|543 col 22|
@unittest.skipIf(sysconfig.get_config_var('TANH_PRESERVES_ZERO_SIGN') == 0,
"system tanh() function doesn't copy the sign")
Lib/test/test_math.py|978 col 22|
@unittest.skipIf(sysconfig.get_config_var('TANH_PRESERVES_ZERO_SIGN') == 0,
"system tanh() function doesn't copy the sign")
----------
_______________________________________
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