本文整理匯總了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'))