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

Method setUpClass

test/sorting.test.py:207–235  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

205 # incorrectly, if time is included.
206 @classmethod
207 def setUpClass(cls):
208 cls.t = Task()
209
210 # Report to use when running this class's tests
211 cls._report = "foo"
212
213 cls.t.config("dateformat", "SNHDMY")
214 cls.t.config("report.foo.columns", "entry,start,end,description")
215 cls.t.config("report.foo.dateformat", "SNHDMY")
216
217 # Preparing data:
218 # 2 tasks created in the past, 1 second apart
219 # 2 tasks created in the past, and started 10 seconds later
220 # 2 tasks created in the past, and finished 20 seconds later
221
222 stamp = int(time.time())
223 cls.t("add one older entry:{0}".format(stamp))
224 stamp += 1
225 cls.t("add one newer entry:{0}".format(stamp))
226
227 start = stamp + 10
228 cls.t("add two older entry:{0} start:{1}".format(stamp, start))
229 start += 1
230 cls.t("add two newer entry:{0} start:{1}".format(stamp, start))
231
232 end = start + 10
233 cls.t("log three older entry:{0} end:{1}".format(stamp, end))
234 end += 1
235 cls.t("log three newer entry:{0} end:{1}".format(stamp, end))
236
237 TESTS = {
238 ("entry+", ("one older.+one newer",)),

Callers

nothing calls this directly

Calls 2

TaskClass · 0.90
configMethod · 0.80

Tested by

no test coverage detected