Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
92929d8
provide support for %F token in strptime; add test for it and %T
jyalim Oct 26, 2025
b1bf9b4
📜🤖 Added by blurb_it.
blurb-it[bot] Oct 27, 2025
d84fd54
rm comment as recommended
jyalim Oct 28, 2025
cb8d7d3
Update Misc/NEWS.d/next/Library/2025-10-27-00-13-04.gh-issue-140644.W…
jyalim Oct 28, 2025
634ecea
Rename NEWS blurbit to match new github issue name
jyalim Oct 28, 2025
2e94037
Update test_strptime.py to use unittest methods, as requested
jyalim Oct 28, 2025
c23b731
simplify news per recommendation
jyalim Oct 28, 2025
e77ff96
Remove datetime tests from test_strptime.py (added to `datetimetester…
jyalim Oct 28, 2025
ffbc215
Tests moved to datetimetester.py
jyalim Oct 28, 2025
fb63ae7
Merge branch 'main' into fix-issue-140644
StanFromIreland Feb 7, 2026
ff10b73
Update Misc/NEWS.d/next/Library/2025-10-27-00-13-04.gh-issue-140715.W…
jyalim Feb 7, 2026
b4ec5f8
Update Lib/test/test_strptime.py
jyalim Feb 7, 2026
8513e1d
Update Lib/test/datetimetester.py
jyalim Feb 7, 2026
0a928e6
Update Lib/test/datetimetester.py
jyalim Feb 7, 2026
029ed4f
refactor test for %F as requested
jyalim Feb 7, 2026
88c6f02
refactor test for %F and %T as requested
jyalim Feb 7, 2026
707ea08
refactor test %T as requested; rename %F + %T tests to match datetime…
jyalim Feb 7, 2026
c61cb2f
add %F and %T tests, as requested, for ensuring strptime & strftime t…
jyalim Feb 7, 2026
10ab774
remove (0) note for %F in documentation, as requested
jyalim Feb 7, 2026
179afae
revert date change in
jyalim Feb 8, 2026
f56f54a
documenting %F addition to strptime
jyalim Feb 8, 2026
29ba043
Update Lib/test/test_strptime.py
jyalim Feb 8, 2026
7d4c618
Update Lib/test/datetimetester.py
jyalim Feb 8, 2026
2cf4890
Update Doc/library/datetime.rst
jyalim Feb 8, 2026
c5593dd
Update Doc/library/datetime.rst
jyalim Feb 8, 2026
b0ca1d2
Update Lib/test/test_strptime.py
jyalim Feb 8, 2026
46981d1
Update Lib/test/datetimetester.py
jyalim Feb 8, 2026
500552b
relocate test methods for %F and %T to TestDate and TestDateTime (res…
jyalim Feb 8, 2026
18757eb
Update Lib/test/datetimetester.py
StanFromIreland Feb 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tests moved to datetimetester.py
  • Loading branch information
jyalim authored Oct 28, 2025
commit ffbc21513046d84d51b834feba12798498c321aa
14 changes: 14 additions & 0 deletions Lib/test/datetimetester.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,20 @@ def test_strptime_leap_year(self):
date.strptime('20-03-14', '%y-%m-%d')
date.strptime('02-29,2024', '%m-%d,%Y')

def test_strptime_C99_shorthand_year_month_day(self):
Comment thread
jyalim marked this conversation as resolved.
Outdated
formats = dict(short="%F",long="%Y-%m-%d")
test_date = "2025-10-26"
shorthand = datetime.strptime(test_date,formats["short"])
long_hand = datetime.strptime(test_date,formats["long"])
self.assertEqual(shorthand,long_hand)

def test_strptime_C99_shorthand_hour_minute_second(self):
Comment thread
jyalim marked this conversation as resolved.
Outdated
formats = dict(short="%T",long="%H:%M:%S")
Comment thread
jyalim marked this conversation as resolved.
Outdated
test_time = "15:00:00"
shorthand = datetime.strptime(test_time,formats["short"])
long_hand = datetime.strptime(test_time,formats["long"])
self.assertEqual(shorthand,long_hand)

class SubclassDate(date):
sub_var = 1

Expand Down
Loading