From 69698454c3bc30734cbde14becbffe57925126d7 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Thu, 7 May 2015 17:23:14 +0200 Subject: [PATCH] Tests: Speed up filter.t - None of the tests in filter.t write data. Make use of that by setting up task data once for all included tests. --- test/filter.t | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/test/filter.t b/test/filter.t index 430456ae0..c417f4d1e 100755 --- a/test/filter.t +++ b/test/filter.t @@ -36,16 +36,17 @@ from basetest import Task, TestCase class TestFilter(TestCase): - def setUp(self): - self.t = Task() + @classmethod + def setUpClass(cls): + cls.t = Task() - self.t(("add", "project:A", "prio:H", "+tag", "one", "foo")) - self.t(("add", "project:A", "prio:H", "two")) - self.t(("add", "project:A", "three")) - self.t(("add", "prio:H", "four")) - self.t(("add", "+tag", "five")) - self.t(("add", "six", "foo")) - self.t(("add", "prio:L", "seven", "bar", "foo")) + cls.t(("add", "project:A", "prio:H", "+tag", "one", "foo")) + cls.t(("add", "project:A", "prio:H", "two")) + cls.t(("add", "project:A", "three")) + cls.t(("add", "prio:H", "four")) + cls.t(("add", "+tag", "five")) + cls.t(("add", "six", "foo")) + cls.t(("add", "prio:L", "seven", "bar", "foo")) def test_list(self): """filter - list"""