[issue36833] Add tests for Datetime C API Macros

Paul Ganssle report at bugs.python.org
Tue May 7 10:17:31 EDT 2019


New submission from Paul Ganssle <p.ganssle at gmail.com>:

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.

----------
assignee: p-ganssle
components: Tests
messages: 341731
nosy: edison.abahurire, p-ganssle
priority: normal
severity: normal
status: open
title: Add tests for Datetime C API Macros
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36833>
_______________________________________


More information about the Python-bugs-list mailing list