Message269937
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") |
|
Date |
User |
Action |
Args |
2016-07-07 14:43:39 | xdegaye | set | recipients:
+ xdegaye, vstinner, ned.deily, skrah, yan12125 |
2016-07-07 14:43:39 | xdegaye | set | messageid: <1467902619.15.0.535346315511.issue27442@psf.upfronthosting.co.za> |
2016-07-07 14:43:39 | xdegaye | link | issue27442 messages |
2016-07-07 14:43:39 | xdegaye | create | |
|