Python pandas._libs.tslibs.timezones._p_tz_cache_key() Examples
The following are 6
code examples of pandas._libs.tslibs.timezones._p_tz_cache_key().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pandas._libs.tslibs.timezones
, or try the search function
.
Example #1
Source File: test_timezones.py From recruit with Apache License 2.0 | 5 votes |
def test_cache_keys_are_distinct_for_pytz_vs_dateutil(tz_name): if tz_name == "UTC": pytest.skip("UTC: special case in dateutil") tz_p = timezones.maybe_get_tz(tz_name) tz_d = timezones.maybe_get_tz("dateutil/" + tz_name) if tz_d is None: pytest.skip(tz_name + ": dateutil does not know about this one") assert timezones._p_tz_cache_key(tz_p) != timezones._p_tz_cache_key(tz_d)
Example #2
Source File: test_timezones.py From vnpy_crypto with MIT License | 5 votes |
def test_cache_keys_are_distinct_for_pytz_vs_dateutil(tz_name): if tz_name == 'UTC': # skip utc as it's a special case in dateutil return tz_p = timezones.maybe_get_tz(tz_name) tz_d = timezones.maybe_get_tz('dateutil/' + tz_name) if tz_d is None: # skip timezones that dateutil doesn't know about. return assert timezones._p_tz_cache_key(tz_p) != timezones._p_tz_cache_key(tz_d)
Example #3
Source File: test_timezones.py From predictive-maintenance-using-machine-learning with Apache License 2.0 | 5 votes |
def test_cache_keys_are_distinct_for_pytz_vs_dateutil(tz_name): if tz_name == "UTC": pytest.skip("UTC: special case in dateutil") tz_p = timezones.maybe_get_tz(tz_name) tz_d = timezones.maybe_get_tz("dateutil/" + tz_name) if tz_d is None: pytest.skip(tz_name + ": dateutil does not know about this one") assert timezones._p_tz_cache_key(tz_p) != timezones._p_tz_cache_key(tz_d)
Example #4
Source File: test_timezones.py From elasticintel with GNU General Public License v3.0 | 5 votes |
def test_cache_keys_are_distinct_for_pytz_vs_dateutil(self): tzs = pytz.common_timezones for tz_name in tzs: if tz_name == 'UTC': # skip utc as it's a special case in dateutil continue tz_p = timezones.maybe_get_tz(tz_name) tz_d = timezones.maybe_get_tz('dateutil/' + tz_name) if tz_d is None: # skip timezones that dateutil doesn't know about. continue assert (timezones._p_tz_cache_key(tz_p) != timezones._p_tz_cache_key(tz_d))
Example #5
Source File: test_timezones.py From coffeegrindsize with MIT License | 5 votes |
def test_cache_keys_are_distinct_for_pytz_vs_dateutil(tz_name): if tz_name == "UTC": pytest.skip("UTC: special case in dateutil") tz_p = timezones.maybe_get_tz(tz_name) tz_d = timezones.maybe_get_tz("dateutil/" + tz_name) if tz_d is None: pytest.skip(tz_name + ": dateutil does not know about this one") assert timezones._p_tz_cache_key(tz_p) != timezones._p_tz_cache_key(tz_d)
Example #6
Source File: test_timezones.py From twitter-stock-recommendation with MIT License | 5 votes |
def test_cache_keys_are_distinct_for_pytz_vs_dateutil(tz_name): if tz_name == 'UTC': # skip utc as it's a special case in dateutil return tz_p = timezones.maybe_get_tz(tz_name) tz_d = timezones.maybe_get_tz('dateutil/' + tz_name) if tz_d is None: # skip timezones that dateutil doesn't know about. return assert timezones._p_tz_cache_key(tz_p) != timezones._p_tz_cache_key(tz_d)