当前位置: 首页>>代码示例>>Python>>正文


Python timezones._p_tz_cache_key方法代码示例

本文整理汇总了Python中pandas._libs.tslibs.timezones._p_tz_cache_key方法的典型用法代码示例。如果您正苦于以下问题:Python timezones._p_tz_cache_key方法的具体用法?Python timezones._p_tz_cache_key怎么用?Python timezones._p_tz_cache_key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pandas._libs.tslibs.timezones的用法示例。


在下文中一共展示了timezones._p_tz_cache_key方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_cache_keys_are_distinct_for_pytz_vs_dateutil

# 需要导入模块: from pandas._libs.tslibs import timezones [as 别名]
# 或者: from pandas._libs.tslibs.timezones import _p_tz_cache_key [as 别名]
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) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:13,代码来源:test_timezones.py

示例2: test_cache_keys_are_distinct_for_pytz_vs_dateutil

# 需要导入模块: from pandas._libs.tslibs import timezones [as 别名]
# 或者: from pandas._libs.tslibs.timezones import _p_tz_cache_key [as 别名]
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) 
开发者ID:birforce,项目名称:vnpy_crypto,代码行数:12,代码来源:test_timezones.py

示例3: test_cache_keys_are_distinct_for_pytz_vs_dateutil

# 需要导入模块: from pandas._libs.tslibs import timezones [as 别名]
# 或者: from pandas._libs.tslibs.timezones import _p_tz_cache_key [as 别名]
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)) 
开发者ID:securityclippy,项目名称:elasticintel,代码行数:15,代码来源:test_timezones.py


注:本文中的pandas._libs.tslibs.timezones._p_tz_cache_key方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。