mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-22 11:13:09 +02:00
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.
This commit is contained in:
parent
3a7af017f8
commit
69698454c3
1 changed files with 10 additions and 9 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue