Commit Graph

43 Commits

Author SHA1 Message Date
Timo Furrer be1bea2dcf Remove executable flag from test module 2019-08-24 23:18:54 +02:00
Timo Furrer a4432eef31 Cleanup Python project 2019-08-24 23:10:26 +02:00
Frank Tobia 9abd618083 Add basic tests for maya.intervals() 2019-01-03 13:58:06 -05:00
Frank Tobia 2c2a8d03c8 Fix issue #168: intervals greater than one day were incorrect. 2019-01-02 14:03:34 -05:00
Alex Ward d44a1dd2f6 add tracer tests for slang_ locales 2018-05-26 11:19:36 +01:00
Alex Ward df09625e74 fix failing test 2018-05-15 22:56:28 +01:00
Timo Furrer f09d6eec63 Split RFC3339 test 2018-05-15 09:13:01 +02:00
Marcel Stör 9ef43a29d9 Add RFC3339 unit test 2018-05-14 21:49:47 +02:00
Timo Furrer 4056d1a9aa Implement method to get MayaDT instance as local timezone-aware datetime instance 2018-05-10 17:22:35 +02:00
Timo Furrer 8468dd2ead Fix subtracting MayaDT instances. Fixes #151 2018-05-10 11:04:16 +02:00
Alex Ward 9612d70707 update .when tests to use new prefer_dates_from param 2018-04-16 12:06:12 +01:00
Alex Ward 771a2b6ce2 add tests around weekday names 2018-04-15 17:31:06 +01:00
Jan Vlcinsky 367dac4e62 number of frozen_now variants narrowed to speed up tests 2018-04-03 19:54:18 +02:00
Jan Vlcinsky 59ec275ef6 test with "now" frozen to different times/zones
Using freezegun to freeze current times.
2018-04-03 19:54:18 +02:00
Timo Furrer d0d5a8f75d Explicitly specifiy time struct when getting UTC offset for current time 2018-04-02 12:09:31 +02:00
Jan Vlcinsky e9592a3146 test_maya.py refactored: using parametrization where feasible
repeated code replaced by parameters provided by pytest.

source string and rexpected intentionally indented to match by column
to make checking year, month and date simpler.

Note, that the test_issue_104 was (and still is) failing.
2018-03-31 01:31:14 +02:00
Mat Munn 5458b0bf15 Parsing an ISO8601 duration for an interval 2018-03-21 11:23:22 +11:00
Mat Munn 00d174c9e2 Merge branch 'master' into master 2018-03-18 08:04:51 +11:00
Mat Munn f87f705a53 Added test 2018-03-18 08:03:34 +11:00
Timo Furrer 9a850b4212 PEP8 formatting by white
Used `white maya/ tests/`.
2018-03-17 12:24:18 +01:00
Timo Furrer 13e9f2d896 Implement snap modifiers with maya.snap(). Closes #94 2018-03-17 11:55:18 +01:00
Timo Furrer 0c206ad0db Fix tests 2018-03-17 11:52:47 +01:00
kennethreitz 99ffb773bb Merge branch 'master' into mayadt_subtraction 2018-02-26 17:29:34 -05:00
Tom Barron 24063b5e1b New test and code to address issue 104 2018-01-29 18:10:36 -05:00
Tom Barron b57f4a6775 Proposed update to support MayaDT - MayaDT -> datetime.timedelta 2018-01-29 13:37:31 -05:00
kennethreitz cd7b5b4aae Merge pull request #109 from alysivji/add_pendulum_tz
Add timezone option for parse()
2017-12-03 13:47:31 -06:00
Matt Furden 773cdecab5 Fix prefer_past test at end of year 2017-12-03 00:47:12 -08:00
Aly Sivji ca865cd840 Add timezone parameter to maya.parse() 2017-12-03 00:06:41 -06:00
Timo Furrer 93152fa7f4 Support year_first in maya.parse. Closes #102
This change adds support for a `year_first` keyword argument to the
`maya.parse` function. `maya` will forward this argument to pendulum
which then lets `dateutil.parse` do the work.
2017-11-21 13:19:55 +01:00
Matt Furden fd62815ce5 Fix test variable name change 2017-10-21 09:42:23 -07:00
Matt Furden c0092e74ae Add prefer_past option for when
When parsing dates from websites when encountering ambiguous dates like "December 12th" this is interpreted in the future (when the current date is in October).

When parsing dates that we know must be in the past this is not the correct behavior.

Add a `prefer_past` keyword argument to `when` to allow the user to ensure the date is parsed as being in the past.
2017-10-15 21:49:03 -07:00
Rich Jones b9c501b0e4 Fixes #98 - add support for time struct with test and docs 2017-09-20 19:32:37 +02:00
Dima Spivak fa966900e1 Fix MayaInterval.iso8601() 2017-09-02 11:47:32 -07:00
Troy Harrison cbe9f6bae7 Adds test for issue #89 2017-06-28 14:27:57 -05:00
Moin d5e4853886 updated test to use private _seconds_or_timedelta 2017-05-30 20:03:20 +05:30
Moin 51c4298ece fixed review comment related to argument type check validator and fixed indentation issues 2017-05-28 23:20:40 +05:30
Moin 74092289dd modified test case to validate invalid argument scenario 2017-05-28 23:08:09 +05:30
kennethreitz 251f535d67 Merge pull request #68 from moin18/seconds_or_timedelta_fix
fix 'seconds_or_timedelta' to return ONLY 'datetime.timedelta' object
2017-05-28 08:55:15 -07:00
kennethreitz 98e9a2190a Merge pull request #71 from timofurrer/use-valuerror
Raise ValueError instead of AssertionError
2017-05-28 08:54:27 -07:00
Timo Furrer 4d88eede9d Fix failing tests 2017-05-28 12:23:26 +02:00
Timo Furrer 971ecec9cf Raise ValueError instead of AssertionError 2017-05-28 12:18:35 +02:00
Moin a8a18462fe fix 'seconds_or_timedelta' to return ONLY 'datetime.timedelta' object 2017-05-28 06:49:18 +05:30
Timo Furrer b2ac4f08a5 Move tests into tests directory 2017-05-28 00:33:41 +02:00