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

Method make_function

test/sorting.test.py:49–65  ·  view source on GitHub ↗
(classname, *args, **kwargs)

Source from the content-addressed store, hash-verified

47
48 @staticmethod
49 def make_function(classname, *args, **kwargs):
50 _filter, expectations = args
51
52 def test(self):
53 # ### Body of the usual test_testcase ### #
54 code, out, err = self.t(
55 "rc.report.{0}.sort:{1} {0}".format(self._report, _filter)
56 )
57
58 for expected in expectations:
59 regex = re.compile(expected, re.DOTALL)
60 self.assertRegex(out, regex)
61
62 # Title of test in report
63 test.__doc__ = "{0} sort:{1}".format(classname, _filter)
64
65 return test
66
67
68class TestSorting(TestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected