mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Test: Change most tests to use "add test" instead of split arguments
This commit is contained in:
parent
d711bda35c
commit
27b8cabac1
76 changed files with 1179 additions and 1245 deletions
20
test/undo.t
20
test/undo.t
|
@ -42,23 +42,23 @@ class TestUndo(TestCase):
|
|||
|
||||
def test_add_undo(self):
|
||||
"""'add' then 'undo'"""
|
||||
code, out, err = self.t(('add', 'one'))
|
||||
code, out, err = self.t(('_get', '1.status'))
|
||||
code, out, err = self.t('add one')
|
||||
code, out, err = self.t('_get 1.status')
|
||||
self.assertEqual(out.strip(), 'pending')
|
||||
code, out, err = self.t(('undo'))
|
||||
code, out, err = self.t(('_get', '1.status'))
|
||||
code, out, err = self.t('undo')
|
||||
code, out, err = self.t('_get 1.status')
|
||||
self.assertEqual(out.strip(), '')
|
||||
|
||||
def test_add_done_undo(self):
|
||||
"""'add' then 'done' then 'undo'"""
|
||||
code, out, err = self.t(('add', 'two'))
|
||||
code, out, err = self.t(('_get', '1.status'))
|
||||
code, out, err = self.t('add two')
|
||||
code, out, err = self.t('_get 1.status')
|
||||
self.assertEqual(out.strip(), 'pending')
|
||||
code, out, err = self.t(('1', 'done'))
|
||||
code, out, err = self.t(('_get', '1.status'))
|
||||
code, out, err = self.t('1 done')
|
||||
code, out, err = self.t('_get 1.status')
|
||||
self.assertEqual(out.strip(), 'completed')
|
||||
code, out, err = self.t(('undo'))
|
||||
code, out, err = self.t(('_get', '1.status'))
|
||||
code, out, err = self.t('undo')
|
||||
code, out, err = self.t('_get 1.status')
|
||||
self.assertEqual(out.strip(), 'pending')
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue