From 8493dd7e8421e539f45e65870267569a6b153ce3 Mon Sep 17 00:00:00 2001 From: wtty-fool Date: Sat, 21 Apr 2018 20:16:38 +0200 Subject: [PATCH] Mayan Long Count tests --- tests/test_maya.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_maya.py b/tests/test_maya.py index 96c922e..ca8ffc5 100644 --- a/tests/test_maya.py +++ b/tests/test_maya.py @@ -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", [