Python CommandDateEdition Example

说明

python commanddateedition示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Python

命名空间/包名称: outwikerpageswikiparsercommandsdates

示例#1
文件: test_wikicommanddates.py项目: Jenyay/outwiker

    def testEditParams_03(self):
        self._config.dateTimeFormat.value = '%c'

        command = CommandDateEdition(self.parser)
        params = 'format="%d.%m Абырвалг"'

        result = command.execute(params, '')

        result_right = "21.09 Абырвалг"

        self.assertEqual(result_right, result)

示例#2
文件: test_wikicommanddates.py项目: Jenyay/outwiker

    def testEditEmpty_02(self):
        self._config.dateTimeFormat.value = '%d.%m'

        command = CommandDateEdition(self.parser)
        params = ''

        result = command.execute(params, '')

        result_right = "21.09"

        self.assertEqual(result_right, result)

展开阅读全文