-
Notifications
You must be signed in to change notification settings - Fork 523
Add fix for b-Y-d cases; add tests; remove redundant tests #481
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
Conversation
dateutil/test/test_parser.py
Outdated
| from six.moves import StringIO | ||
|
|
||
|
|
||
| def test_Ybd_permutations(): |
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.
This doesn't actually test anything unless you run it with pytest (and even then it's a deprecated way to do this). The function should be moved into the TestCase object until we move over to pytest, at which point we'll just switch to the parametrized version.
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.
Note that by "moved to" I mean that it should not yield anything, and the assert statement should be switched to a self.assertEqual() call.
|
I forgot we're not using `nose`, will fix this afternoon.
…On Thu, Oct 26, 2017 at 11:00 AM, Paul Ganssle ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In dateutil/test/test_parser.py
<#481 (comment)>:
> @@ -11,6 +12,36 @@
from six.moves import StringIO
+def test_Ybd_permutations():
Note that by "moved to" I mean that it should not yield anything, and the
assert statement should be switched to a self.assertEqual() call.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#481 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHtGeNH2kWS0e4VFdwYvEY8nJrkV2RFPks5swMi1gaJpZM4QG77Y>
.
|
|
Just pushed; added a new test class in the hopes that we can avoid the one-giant-class pattern. It occurs to me: these tests should be robust to "fuzzy", "dayfirst", and "yearfirst". I may follow-up by extending the test. For now let's just get this bugfix in. |
|
I think the appveyor build failure might have been a temporary failure on the AppVeyor side, kicked off a new build. |
dateutil/test/test_parser.py
Outdated
| # terms are in and for each of the separators below. | ||
|
|
||
| seps = ['-', ' ', '/', '.'] | ||
| token_opts = [['%Y'], ['%b', '%B'], ['%d', '%-d']] |
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.
I think %-d might not be supported on Windows.
|
strftime.org says that I've updated it now so that '%-d' tests are only run if the platform supports them, and your innermost I removed the nested for loops for year, month and day because they were not necessary (we'll get back to that when we're using pytest), and also dropped the |
Nice catch! |
Replaces #441