Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/cran/tests/test_cran.py
Show All 14 Lines | from swh.loader.package.cran.loader import ( | ||||
extract_intrinsic_metadata, | extract_intrinsic_metadata, | ||||
CRANLoader, | CRANLoader, | ||||
parse_date, | parse_date, | ||||
parse_debian_control, | parse_debian_control, | ||||
) | ) | ||||
from swh.core.tarball import uncompress | from swh.core.tarball import uncompress | ||||
from swh.model.model import TimestampWithTimezone | from swh.model.model import TimestampWithTimezone | ||||
from swh.loader.package.tests.common import ( | from swh.loader.tests import ( | ||||
assert_last_visit_matches, | |||||
check_snapshot, | check_snapshot, | ||||
get_stats, | get_stats, | ||||
) | ) | ||||
from swh.loader.tests import assert_last_visit_matches | |||||
def test_cran_parse_date(): | def test_cran_parse_date(): | ||||
data = [ | data = [ | ||||
# parsable, some have debatable results though | # parsable, some have debatable results though | ||||
("2001-June-08", datetime(2001, 6, 8, 0, 0, tzinfo=timezone.utc)), | ("2001-June-08", datetime(2001, 6, 8, 0, 0, tzinfo=timezone.utc)), | ||||
( | ( | ||||
"Tue Dec 27 15:06:08 PST 2011", | "Tue Dec 27 15:06:08 PST 2011", | ||||
▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines |