python类HTMLCalendar()的实例源码

test_calendar.py 文件源码 项目:zippy 作者: securesystemslab 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def test_output_htmlcalendar(self):
        encoding = 'ascii'
        cal = calendar.HTMLCalendar()
        self.assertEqual(
            cal.formatyearpage(2004, encoding=encoding).strip(b' \t\n'),
            result_2004_html.strip(' \t\n').encode(encoding)
        )
test_calendar.py 文件源码 项目:oil 作者: oilshell 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def test_output_htmlcalendar(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatyearpage(2004).strip(),
            result_2004_html.strip()
        )
test_calendar.py 文件源码 项目:python2-tracer 作者: extremecoders-re 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def test_output_htmlcalendar(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatyearpage(2004).strip(),
            result_2004_html.strip()
        )
test_calendar.py 文件源码 项目:web_ctp 作者: molebot 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def check_htmlcalendar_encoding(self, req, res):
        cal = calendar.HTMLCalendar()
        self.assertEqual(
            cal.formatyearpage(2004, encoding=req).strip(b' \t\n'),
            (result_2004_html % {'e': res}).strip(' \t\n').encode(res)
        )
test_calendar.py 文件源码 项目:web_ctp 作者: molebot 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def test_formatmonthname_with_year(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=True),
            '<tr><th colspan="7" class="month">January 2004</th></tr>'
        )
test_calendar.py 文件源码 项目:web_ctp 作者: molebot 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def test_formatmonthname_without_year(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=False),
            '<tr><th colspan="7" class="month">January</th></tr>'
        )
calendario.py 文件源码 项目:python-course 作者: juancarlospaco 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def index():
    return template('<h1>Calendar | Calendario<hr> {{!data}}',
                    data=HTMLCalendar().formatyearpage(2016))
test_calendar.py 文件源码 项目:pefile.pypy 作者: cloudtracer 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def test_output_htmlcalendar(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatyearpage(2004).strip(),
            result_2004_html.strip()
        )
test_calendar.py 文件源码 项目:ouroboros 作者: pybee 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def check_htmlcalendar_encoding(self, req, res):
        cal = calendar.HTMLCalendar()
        self.assertEqual(
            cal.formatyearpage(2004, encoding=req),
            (result_2004_html % {'e': res}).encode(res)
        )
test_calendar.py 文件源码 项目:ouroboros 作者: pybee 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def test_formatmonthname_with_year(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=True),
            '<tr><th colspan="7" class="month">January 2004</th></tr>'
        )
test_calendar.py 文件源码 项目:ouroboros 作者: pybee 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def test_formatmonthname_without_year(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=False),
            '<tr><th colspan="7" class="month">January</th></tr>'
        )
test_calendar.py 文件源码 项目:ndk-python 作者: gittor 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def test_output_htmlcalendar(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatyearpage(2004).strip(),
            result_2004_html.strip()
        )
test_calendar.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def check_htmlcalendar_encoding(self, req, res):
        cal = calendar.HTMLCalendar()
        self.assertEqual(
            cal.formatyearpage(2004, encoding=req).strip(b' \t\n'),
            (result_2004_html % {'e': res}).strip(' \t\n').encode(res)
        )
test_calendar.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def test_formatmonthname_with_year(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=True),
            '<tr><th colspan="7" class="month">January 2004</th></tr>'
        )
test_calendar.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def test_formatmonthname_without_year(self):
        self.assertEqual(
            calendar.HTMLCalendar().formatmonthname(2004, 1, withyear=False),
            '<tr><th colspan="7" class="month">January</th></tr>'
        )


问题


面经


文章

微信
公众号

扫码关注公众号