New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-35066: Make trailing percent test more portable. #15907
Conversation
Lib/test/datetimetester.py
Outdated
| @@ -1456,8 +1456,11 @@ def test_strftime_trailing_percent(self): | |||
| _time.strftime('%') | |||
| except ValueError: | |||
| self.skipTest('time module does not support trailing %') | |||
| self.assertEqual(t.strftime('%'), '%') | |||
| self.assertEqual(t.strftime("m:%m d:%d y:%y %"), "m:03 d:02 y:05 %") | |||
| self.assertEqual(t.strftime('%'), _time.strftime('%'), t.timetuple()) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| self.assertEqual(t.strftime('%'), _time.strftime('%'), t.timetuple()) | |
| self.assertEqual(t.strftime('%'), _time.strftime('%', t.timetuple())) |
|
When you're done making the requested changes, leave the comment: And if you don't make the requested changes, you will be poked with soft cushions! |
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.
|
I have made the requested changes; please review again.
…On Wed, Sep 11, 2019, at 11:25, Bedevere (bot) wrote:
When you're done making the requested changes, leave the comment: `I
have made the requested changes; please review again`.
And if you don't make the requested changes, you will be poked with
soft cushions! <https://youtu.be/XnS49c9KZw8?t=1m7s>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#15907?email_source=notifications&email_token=AABVSTTFY4LKKUJYMMZ2JQ3QJDBTNA5CNFSM4IVR2PF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OAWKI#issuecomment-530320169>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABVSTRREECRETA6NSHPC4LQJDBTNANCNFSM4IVR2PFQ>.
|
|
Thanks for making the requested changes! @pganssle: please review the changes made to this pull request. |
|
Per conversation at the core dev sprint - I'm mildly uncomfortable about changing this because the aspiration is that this behavior should work on all platforms, and we should probably set platform-specific expected failures instead of changing this, but practically speaking, this might break a bunch of platforms while we're not really prepared to actually create a platform-independent version of this, so for now I agree that we should do this more-portable version of the test. |
|
Thanks @benjaminp for the PR |
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 f2173ae) Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
GH-15915 is a backport of this pull request to the 3.8 branch. |
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 f2173ae) Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
GH-15916 is a backport of this pull request to the 3.7 branch. |
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 f2173ae) Co-authored-by: Benjamin Peterson <benjamin@python.org>
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 f2173ae) Co-authored-by: Benjamin Peterson <benjamin@python.org>
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.
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.
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.
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.
https://bugs.python.org/issue35066
Automerge-Triggered-By: @pganssle
Automerge-Triggered-By: @pganssle