From cc4a4c339a125f0df415cefdedbeb27730102f54 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mon, 8 Apr 2013 11:56:42 -0400 Subject: [PATCH] Compatibility between experimental and normal modes. --- taskw/test/test_datas.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/taskw/test/test_datas.py b/taskw/test/test_datas.py index cbae026..e1e677a 100644 --- a/taskw/test/test_datas.py +++ b/taskw/test/test_datas.py @@ -132,6 +132,20 @@ def test_updating_task(self): tasks = self.tw.load_tasks() eq_(len(tasks['pending']), 1) + + # For compatibility with the normal and experimental modes. + # Experimental returns more information. + try: + # Experimental mode returns the correct urgency, so, + # let's just not compare for now. + del tasks['pending'][0]['urgency'] + del task['urgency'] + + # Also, experimental mode returns the id. So, avoid comparing. + del tasks['pending'][0]['id'] + except: + pass + eq_(tasks['pending'][0], task) @raises(KeyError)