• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python utilities.hbcal函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中utilities.hbcal函数的典型用法代码示例。如果您正苦于以下问题:Python hbcal函数的具体用法?Python hbcal怎么用?Python hbcal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: test_gregorian_julian_option

    def test_gregorian_julian_option(self):
        """Test --output specifying Gregorian and Julian calendars.

        These options are incompatible, so the program terminates with an
        error.
        """
        with self.assertRaises(SystemExit):
            hbcal("hbcal -ic -o gregorian julian -fphonetics 17 8 1750")
开发者ID:markastern,项目名称:hbcal,代码行数:8,代码来源:test_output_calendar.py


示例2: test_long_option_multiple_calendars

 def test_long_option_multiple_calendars(self):
     """Test use of one --output option (long) with 2 calendars"""
     output = hbcal("hbcal -ic --output julian hebrew -fphonetics" +
                    " 17 8 2015")
     self.assertEqual(2, len(output))
     self.assertEqual('Monday 4 August 2015', output[0])
     self.assertEqual('Monday 2 Ellul 5775', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:7,代码来源:test_output_calendar.py


示例3: test_multiple_long_options

 def test_multiple_long_options(self):
     """Test double use of --output (long version)"""
     output = hbcal("hbcal -ic --output julian --output hebrew" +
                    " -fphonetics 17 8 2015")
     self.assertEqual(2, len(output))
     self.assertEqual('Monday 4 August 2015', output[0])
     self.assertEqual('Monday 2 Ellul 5775', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:7,代码来源:test_output_calendar.py


示例4: test_julian_hebrew_daf_option_2015

 def test_julian_hebrew_daf_option_2015(self):
     """Test --output specifying Julian, Hebrew and Daf Yomi."""
     output = hbcal("hbcal -ic -o julian hebrew daf -fphonetics 17 8 2015")
     self.assertEqual(3, len(output))
     self.assertEqual('Monday 4 August 2015', output[0])
     self.assertEqual('Monday 2 Ellul 5775', output[1])
     self.assertEqual('Nedarim 85', output[2])
开发者ID:markastern,项目名称:hbcal,代码行数:7,代码来源:test_output_calendar.py


示例5: test_short_option_abbreviated

    def test_short_option_abbreviated(self):
        """Test '-fp' in command line.

        This tests a short option with an abbreviated value.
        """
        output = hbcal("hbcal -ih -o -s -fp 1 8 5775")
        self.assertEqual('Noach', output[0])
开发者ID:markastern,项目名称:hbcal,代码行数:7,代码来源:test_output_format.py


示例6: test_early_morning

    def test_early_morning(self):
        """Test molad before 6am.

        This was added as a regression test because it used to fail.
        """
        output = hbcal("hbcal -m -ih -oc 1 6 5775")
        self.assertEqual('Saturday 15 August 2015 04:23 and 8 parts',
                         output[0])
开发者ID:markastern,项目名称:hbcal,代码行数:8,代码来源:test_molad_parameter.py


示例7: test_default_1750

    def test_default_1750(self):
        """Test default value of --output parameter before 1752.

        No daf is output because the date precedes the inauguration
        of Daf Yomi.
        """
        output = hbcal("hbcal -ic -fphonetics 17 8 1750")
        self.assertEqual(1, len(output))
        self.assertEqual('Friday 26 Av 5510', output[0])
开发者ID:markastern,项目名称:hbcal,代码行数:9,代码来源:test_output_calendar.py


示例8: test_julian_daf_option_1750

    def test_julian_daf_option_1750(self):
        """Test --output specifying Julian and Daf Yomi before 1752.

        No daf is output because the date precedes the inauguration
        of Daf Yomi.
        """
        output = hbcal("hbcal -ic -o julian daf -fphonetics 17 8 1750")
        self.assertEqual(1, len(output))
        self.assertEqual('Friday 17 August 1750', output[0])
开发者ID:markastern,项目名称:hbcal,代码行数:9,代码来源:test_output_calendar.py


示例9: test_civil_hebrew_daf_option_1750

    def test_civil_hebrew_daf_option_1750(self):
        """Test --output specifying civil, Hebrew and Daf Yomi before 1752.

        No daf is output because the date precedes the inauguration
        of Daf Yomi.
        """
        output = hbcal("hbcal -ic -o civil hebrew daf -fphonetics 17 8 1750")
        self.assertEqual(2, len(output))
        self.assertEqual('Friday 17 August 1750', output[0])
        self.assertEqual('Friday 26 Av 5510', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:10,代码来源:test_output_calendar.py


示例10: test_same_tractate

    def test_same_tractate(self):
        """Test daf yomi input calendar at the start/end of a tractate.

        The current date is the last civil date of the tractate.
        The daf yomi calendar is bound to the Hebrew calendar (command line
        options). However, the time is before 6pm. Therefore the requested
        date is for daf 21 of the old tractate.
        """
        output = hbcal("hbcal -id --dafbind hebrew -fphonetics 21")
        self.assertEqual(2, len(output))
        self.assertEqual('Monday 16 November 2015', output[0])
        self.assertEqual('Monday 4 Kislev 5776', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:12,代码来源:test_current_date.py


示例11: test_same_daf_yomi_cycle

    def test_same_daf_yomi_cycle(self):
        """Test daf yomi input calendar at the start/end of a cycle.

        The current date is the last civil date of the cycle.
        The daf yomi calendar is bound to the Hebrew calendar (command line
        options). However, the time is before 6pm. Therefore the requested
        date is for Pesachim 21 of the old cycle.
        """
        output = hbcal("hbcal -id --dafbind hebrew -fphonetics 21 4")
        self.assertEqual(2, len(output))
        self.assertEqual('Tuesday 7 February 2006', output[0])
        self.assertEqual('Tuesday 9 Shevat 5766', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:12,代码来源:test_current_date.py


示例12: test_same_month_minus_date

 def test_same_month_minus_date(self):
     output = hbcal("hbcal -ic -fphonetics -1")
     self.assertEqual(2, len(output))
     self.assertEqual('Sunday 31 January 2010', output[0])
     self.assertEqual('Sunday 16 Shevat 5770', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_current_date.py


示例13: test_julian_option_1750

 def test_julian_option_1750(self):
     """Test --output with Julian calendar before 1752"""
     output = hbcal("hbcal -ic -o julian -fphonetics 17 8 1750")
     self.assertEqual(1, len(output))
     self.assertEqual('Friday 17 August 1750', output[0])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_output_calendar.py


示例14: test_hebrew_option_5775

 def test_hebrew_option_5775(self):
     """Test --output with Hebrew calendar"""
     output = hbcal("hbcal -ic -o hebrew -fphonetics 17 8 2015")
     self.assertEqual(1, len(output))
     self.assertEqual('Monday 2 Ellul 5775', output[0])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_output_calendar.py


示例15: test_same_year_hebrew

 def test_same_year_hebrew(self):
     output = hbcal("hbcal -ih -fphonetics 21 4")
     self.assertEqual(2, len(output))
     self.assertEqual('Saturday 3 July 2010', output[0])
     self.assertEqual('Saturday 21 Tammuz 5770', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_current_date.py


示例16: test_same_month_hebrew

 def test_same_month_hebrew(self):
     output = hbcal("hbcal -ih -fphonetics 21")
     self.assertEqual(2, len(output))
     self.assertEqual('Thursday 7 January 2010', output[0])
     self.assertEqual('Thursday 21 Teveth 5770', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_current_date.py


示例17: test_daf_option_5775

 def test_daf_option_5775(self):
     """Test --output with Daf Yomi calendar"""
     output = hbcal("hbcal -ic -o daf -fphonetics 17 8 2015")
     self.assertEqual(1, len(output))
     self.assertEqual('Nedarim 85', output[0])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_output_calendar.py


示例18: test_same_year_julian

 def test_same_year_julian(self):
     output = hbcal("hbcal -ij -fphonetics 21 4")
     self.assertEqual(2, len(output))
     self.assertEqual('Monday 4 May 2009', output[0])
     self.assertEqual('Monday 10 Iyar 5769', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_current_date.py


示例19: test_same_month_julian

 def test_same_month_julian(self):
     output = hbcal("hbcal -ij -fphonetics 21")
     self.assertEqual(2, len(output))
     self.assertEqual('Sunday 3 January 2010', output[0])
     self.assertEqual('Sunday 17 Teveth 5770', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_current_date.py


示例20: test_today_daf

 def test_today_daf(self):
     output = hbcal("hbcal -id -fphonetics")
     self.assertEqual(2, len(output))
     self.assertEqual('Friday 1 January 2010', output[0])
     self.assertEqual('Friday 15 Teveth 5770', output[1])
开发者ID:markastern,项目名称:hbcal,代码行数:5,代码来源:test_current_date.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utilities.humanize_class函数代码示例发布时间:2022-05-26
下一篇:
Python utilities.get_qgis_app函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap