MCPcopy Create free account
hub / github.com/coooodeer/parse-rust / test_datetime_group_count

Function test_datetime_group_count

tests/test_parse.py:616–631  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

614
615
616def test_datetime_group_count():
617 # test we increment the group count correctly for datetimes
618 r = parse.parse("{:ti} {}", "1972-01-01 spam")
619 assert r.fixed[1] == "spam"
620 r = parse.parse("{:tg} {}", "1-1-1972 spam")
621 assert r.fixed[1] == "spam"
622 r = parse.parse("{:ta} {}", "1-1-1972 spam")
623 assert r.fixed[1] == "spam"
624 r = parse.parse("{:th} {}", "21/Nov/2011:10:21:36 +1000 spam")
625 assert r.fixed[1] == "spam"
626 r = parse.parse("{:te} {}", "21 Nov 2011 10:21:36 +1000 spam")
627 assert r.fixed[1] == "spam"
628 r = parse.parse("{:tc} {}", "Mon Nov 21 10:21:36 2011 spam")
629 assert r.fixed[1] == "spam"
630 r = parse.parse("{:tt} {}", "10:21 spam")
631 assert r.fixed[1] == "spam"
632
633
634def test_mixed_types():

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected