➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
标题: Add tests for Datetime C API Macros
类型: enhancement Stage: resolved
Components: Tests Versions: Python 3.9
process
状态: closed Resolution: fixed
Dependencies: 后续:
分配给: p-ganssle 抄送列表: anthony shaw, edison.abahurire, nanjekyejoannah, p-ganssle, vstinner
优先级: normal 关键字: patch

Created on 2019-05-07 14:17 by p-ganssle, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14842 merged nanjekyejoannah, 2019-07-18 14:50
Messages (4)
msg341731 - (view) Author: Paul Ganssle (p-ganssle) * (Python committer) 日期: 2019-05-07 14:17
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.
msg342235 - (view) Author: Edison Abahurire (edison.abahurire) * 日期: 2019-05-12 01:54
I'm now working on this as pbo-36782 awaits merging.
msg350771 - (view) Author: STINNER Victor (vstinner) * (Python committer) 日期: 2019-08-29 12:54
New changeset 2c5fb1711818926862d0d7b2e5effcaa5a5eb002 by Victor Stinner (Joannah Nanjekye) in branch 'master':
bpo-36833: Add tests for Datetime C API Macros (GH-14842)
https://github.com/python/cpython/commit/2c5fb1711818926862d0d7b2e5effcaa5a5eb002
msg350772 - (view) Author: STINNER Victor (vstinner) * (Python committer) 日期: 2019-08-29 12:55
Thanks Joannah Nanjekye, well done ;-)
历史
日期 用户 动作 参数
2022-04-11 14:59:14admin修改github: 81014
2019-08-29 12:55:19vstinner修改状态: open -> closed
resolution: fixed
消息: + msg350772

stage: patch review -> resolved
2019-08-29 12:54:49vstinner修改抄送: + vstinner
消息: + msg350771
2019-07-18 14:50:11nanjekyejoannah修改keywords: + patch
stage: patch review
pull_requests: + pull_request14633
2019-07-18 14:41:10nanjekyejoannah修改抄送: + nanjekyejoannah

versions: + Python 3.9
2019-05-12 01:54:41edison.abahurire修改抄送: + anthony shaw
消息: + msg342235
2019-05-07 14:17:31p-ganssle创建