forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest_api.py
47 lines (41 loc) · 1005 Bytes
/
test_api.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""Tests that the tslibs API is locked down"""
from pandas._libs import tslibs
def test_namespace():
submodules = [
"c_timestamp",
"ccalendar",
"conversion",
"fields",
"frequencies",
"nattype",
"np_datetime",
"offsets",
"parsing",
"period",
"resolution",
"strptime",
"timedeltas",
"timestamps",
"timezones",
"tzconversion",
]
api = [
"NaT",
"NaTType",
"iNaT",
"is_null_datetimelike",
"NullFrequencyError",
"OutOfBoundsDatetime",
"Period",
"IncompatibleFrequency",
"Timedelta",
"Timestamp",
"delta_to_nanoseconds",
"ints_to_pytimedelta",
"localize_pydatetime",
"normalize_date",
"tz_convert_single",
]
expected = set(submodules + api)
names = [x for x in dir(tslibs) if not x.startswith("__")]
assert set(names) == expected