Message333654
Whether or not the HAVE_STRUCT_TM_TM_ZONE is defined, _STRUCT_TM_ITEMS always equal to 11. It is initialized at PyInit_time(void).
PyModule_AddIntConstant(m, "_STRUCT_TM_ITEMS", 11);
If I modify it like this:
#ifdef HAVE_STRUCT_TM_TM_ZONE
PyModule_AddIntConstant(m, "_STRUCT_TM_ITEMS", 11)
#else
PyModule_AddIntConstant(m, "_STRUCT_TM_ITEMS", 9)
#endif
Then test_fields at test_structseq.py will fail.
def test_fields(self):
self.assertEqual(t.n_fields, time._STRUCT_TM_ITEMS)
What I hope is that if HAVE_STRUCT_TM_TM_ZONE is not defined, test_localtime_timezone will be skipped. |
|
Date |
User |
Action |
Args |
2019-01-15 09:32:09 | jianxu3 | set | recipients:
+ jianxu3 |
2019-01-15 09:32:07 | jianxu3 | set | messageid: <1547544727.75.0.967204925198.issue35741@roundup.psfhosted.org> |
2019-01-15 09:32:07 | jianxu3 | link | issue35741 messages |
2019-01-15 09:32:07 | jianxu3 | create | |
|