This is a child issue for bpo 36782, specifically for testing the macro-only datetime C API functions
Untested macros with no corresponding API module:
- PyDateTime_GET_YEAR
- PyDateTime_GET_MONTH
- PyDateTime_GET_DAY
- PyDateTime_DATE_GET_HOUR
- PyDateTime_DATE_GET_MINUTE
- PyDateTime_DATE_GET_SECOND
- PyDateTime_DATE_GET_MICROSECOND
- PyDateTime_TIME_GET_HOUR
- PyDateTime_TIME_GET_MINUTE
- PyDateTime_TIME_GET_SECOND
- PyDateTime_TIME_GET_MICROSECOND
- PyDateTime_DELTA_GET_DAYS
- PyDateTime_DELTA_GET_SECONDS
- PyDateTime_DELTA_GET_MICROSECONDS
For all of these, I think you can write one "wrapper function" that just extracts all fields as a tuple (4 C API wrapper functions - date, datetime, time, timedelta).
For each function, test with both the standard class and a subclass. |