本文整理汇总了Python中validation.Validate.validate_time方法的典型用法代码示例。如果您正苦于以下问题:Python Validate.validate_time方法的具体用法?Python Validate.validate_time怎么用?Python Validate.validate_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validation.Validate
的用法示例。
在下文中一共展示了Validate.validate_time方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_time_nothing
# 需要导入模块: from validation import Validate [as 别名]
# 或者: from validation.Validate import validate_time [as 别名]
def test_time_nothing(self):
self.assertFalse(Validate.validate_time(''))
示例2: test_time_valid
# 需要导入模块: from validation import Validate [as 别名]
# 或者: from validation.Validate import validate_time [as 别名]
def test_time_valid(self):
self.assertTrue(Validate.validate_time('12:35'))
示例3: test_time_wrong_divider
# 需要导入模块: from validation import Validate [as 别名]
# 或者: from validation.Validate import validate_time [as 别名]
def test_time_wrong_divider(self):
self.assertFalse(Validate.validate_time('15.40'))
示例4: test_time_too_much_min
# 需要导入模块: from validation import Validate [as 别名]
# 或者: from validation.Validate import validate_time [as 别名]
def test_time_too_much_min(self):
self.assertFalse(Validate.validate_time('15:60'))
示例5: test_time_too_much_hour
# 需要导入模块: from validation import Validate [as 别名]
# 或者: from validation.Validate import validate_time [as 别名]
def test_time_too_much_hour(self):
self.assertFalse(Validate.validate_time('25:30'))
示例6: test_time_too_many_char
# 需要导入模块: from validation import Validate [as 别名]
# 或者: from validation.Validate import validate_time [as 别名]
def test_time_too_many_char(self):
self.assertFalse(Validate.validate_time('005:30'))
示例7: test_time_alpha
# 需要导入模块: from validation import Validate [as 别名]
# 或者: from validation.Validate import validate_time [as 别名]
def test_time_alpha(self):
self.assertFalse(Validate.validate_time('5:w0'))