MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / assertString

Method assertString

test/export.test.py:67–82  ·  view source on GitHub ↗

Checks the type of value to be string, and that content is as passed in the expected_value argument. This can be either a string, or a compiled regular expression object.

(self, value, expected_value=None, regexp=False)

Source from the content-addressed store, hash-verified

65 datetime.datetime.strptime(value, DATETIME_FORMAT)
66
67 def assertString(self, value, expected_value=None, regexp=False):
68 """
69 Checks the type of value to be string, and that content is as passed in
70 the expected_value argument. This can be either a string, or a compiled
71 regular expression object.
72 """
73
74 self.assertType(value, STRING_TYPE)
75
76 if expected_value is not None:
77 if regexp:
78 # Match to pattern if checking with regexp
79 self.assertRegex(value, expected_value)
80 else:
81 # Equality match if checking with string
82 self.assertEqual(value, expected_value)
83
84 def assertNumeric(self, value, expected_value=None):
85 """

Callers 9

test_export_statusMethod · 0.95
test_export_uuidMethod · 0.95
test_export_recurMethod · 0.95
test_export_projectMethod · 0.95
test_export_priorityMethod · 0.95
test_export_dependsMethod · 0.95

Calls 1

assertTypeMethod · 0.95

Tested by

no test coverage detected