]> granicus.if.org Git - python/commit
bpo-35066: Make trailing percent test more portable. (GH-15907)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 11 Sep 2019 11:47:16 +0000 (04:47 -0700)
committerGitHub <noreply@github.com>
Wed, 11 Sep 2019 11:47:16 +0000 (04:47 -0700)
commitf3e430b07975c84cf34c927851df234d04d5753f
tree31cc471cf267558eda622c6537ba98c599bd9b60
parent0a6693a469cfb1dd5c8048d8cb4231a7b5883251
bpo-35066: Make trailing percent test more portable. (GH-15907)

Different libc implementations have different behavior when presented with trailing % in strftime strings. To make test_strftime_trailing_percent more portable, compare the output of datetime.strftime directly to that of time.strftime rather than hardcoding.
(cherry picked from commit f2173ae38fa49235c3cdc28ae2ca2e19a375a596)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Lib/test/datetimetester.py