mirror of
https://github.com/kennethreitz/maya.git
synced 2026-06-05 06:46:14 +00:00
Mayan Long Count tests
This commit is contained in:
@@ -30,6 +30,21 @@ def test_iso8601(string, expected):
|
||||
assert r == d.iso8601()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"string,expected",
|
||||
[
|
||||
('January 1, 1970', "12.17.16.7.5"),
|
||||
('December 21, 2012', "13.0.0.0.0"),
|
||||
('March 4, 1900', "12.14.5.10.0"),
|
||||
],
|
||||
)
|
||||
def test_long_count(string, expected):
|
||||
r = maya.parse(string).long_count()
|
||||
d = maya.MayaDT.from_long_count(r)
|
||||
assert r == expected
|
||||
assert r == d.long_count()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"string,expected",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user