diff --git a/test/annotate.t b/test/annotate.t index 630397667..1424b8260 100755 --- a/test/annotate.t +++ b/test/annotate.t @@ -81,7 +81,7 @@ class TestAnnotate(TestCase): self.t.config("report.rrr.columns", "id,description") self.t.config("report.rrr.sort", "id+") self.t.config("dateformat", "m/d/Y") - self.t.config("color", "off") + self.t.config("color", "0") code, out, err = self.t("rrr") @@ -154,7 +154,7 @@ class TestAnnotation(TestCase): def setUp(self): """Executed before each test in the class""" self.t = Task() - self.t.config("confirmation", "yes") + self.t.config("confirmation", "1") def test_blank_annotation(self): """Verify blank annotations are prevented""" diff --git a/test/basetest/task.py b/test/basetest/task.py index 35d0af84f..f83bb0358 100644 --- a/test/basetest/task.py +++ b/test/basetest/task.py @@ -72,7 +72,7 @@ class Task(object): def activate_hooks(self): """Enable self.hooks functionality and activate hooks on config """ - self.config("hooks", "on") + self.config("hooks", "1") self.hooks = Hooks(self.datadir) def reset_env(self): diff --git a/test/bulk.t b/test/bulk.t index a6b88d707..38f276e96 100755 --- a/test/bulk.t +++ b/test/bulk.t @@ -47,50 +47,50 @@ class TestBulk(TestCase): self.t("add three") def test_bulk_confirmations_single_confirmation_off(self): - """not bulk delete 1 tasks with confirmation:off deletes it""" + """not bulk delete 1 tasks with confirmation:0 deletes it""" # Test with 1 task. 1 is a special case. - code, out, err = self.t("1 delete rc.confirmation:off") + code, out, err = self.t("1 delete rc.confirmation:0") self.assertNotIn("(yes/no)", out) self.assertNotIn("(yes/no/all/quit)", out) self.assertIn("Deleting task 1", out) def test_bulk_confirmations_single_confirmation_on(self): - """not bulk delete 1 task with confirmation:on and input >y deletes it""" + """not bulk delete 1 task with confirmation:1 and input >y deletes it""" # Test with 1 task. 1 is a special case. - code, out, err = self.t("2 delete rc.confirmation:on", input="y\n") + code, out, err = self.t("2 delete rc.confirmation:1", input="y\n") self.assertIn("(yes/no)", out) self.assertNotIn("(yes/no/all/quit)", out) self.assertIn("Deleting task 2", out) def test_bulk_confirmations_double_confirmation_off(self): - """not bulk delete 2 tasks with confirmation:off deletes them""" + """not bulk delete 2 tasks with confirmation:0 deletes them""" # Test with 2 tasks. 2 is greater than 1 and less than bulk. - code, out, err = self.t("1-2 delete rc.confirmation:off") + code, out, err = self.t("1-2 delete rc.confirmation:0") self.assertNotIn("(yes/no)", out) self.assertNotIn("(yes/no/all/quit)", out) self.assertIn("Deleting task 1", out) self.assertIn("Deleting task 2", out) def test_bulk_confirmations_double_confirmation_on(self): - """not bulk delete 2 tasks with confirmation:on and input >y >y deletes them""" + """not bulk delete 2 tasks with confirmation:1 and input >y >y deletes them""" # Test with 2 tasks. 2 is greater than 1 and less than bulk. - code, out, err = self.t("1-2 delete rc.confirmation:on", input="y\ny\n") + code, out, err = self.t("1-2 delete rc.confirmation:1", input="y\ny\n") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertIn("Deleting task 1", out) self.assertIn("Deleting task 2", out) def test_bulk_confirmations_bulk_confirmation_off(self): - """bulk delete 3 tasks with confirmation:off always prompts""" + """bulk delete 3 tasks with confirmation:0 always prompts""" # Test with 3 tasks. 3 is considered bulk. rc.confirmation has no effect on bulk # Delete task 1 'one'? (yes/no/all/quit) --> timeout - code, out, err = self.t.runError("1-3 delete rc.confirmation:off") + code, out, err = self.t.runError("1-3 delete rc.confirmation:0") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertNotIn("Deleting task", out) @@ -102,7 +102,7 @@ class TestBulk(TestCase): # Delete task 2 'two'? (yes/no/all/quit) Deleting task 2 'two'. # Delete task 3 'three'? (yes/no/all/quit) Deleting task 3 'three'. # Deleted 3 tasks. - code, out, err = self.t("1-3 delete rc.confirmation:off", input="y\ny\ny\n") + code, out, err = self.t("1-3 delete rc.confirmation:0", input="y\ny\ny\n") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertIn("Deleting task 1", out) @@ -113,7 +113,7 @@ class TestBulk(TestCase): """bulk delete 3 tasks with confirmation:on and input >y >y >y deletes them""" # Test with 3 tasks. 3 is considered bulk. rc.confirmation has no effect on bulk - code, out, err = self.t("1-3 delete rc.confirmation:on", input="y\ny\ny\n") + code, out, err = self.t("1-3 delete rc.confirmation:1", input="y\ny\ny\n") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertIn("Deleting task 1", out) @@ -124,14 +124,14 @@ class TestBulk(TestCase): """bulk delete >no deletes nothing""" # Test with 1 task, denying delete. - code, out, err = self.t.runError("1 delete rc.confirmation:on", input="n\n") + code, out, err = self.t.runError("1 delete rc.confirmation:1", input="n\n") self.assertIn("(yes/no)", out) self.assertNotIn("(yes/no/all/quit)", out) self.assertNotIn("Deleted task 1", out) self.assertNotIn("Deleting task", out) # Test with 2 tasks, denying delete. - code, out, err = self.t.runError("1-2 delete rc.confirmation:on", input="n\nn\n") + code, out, err = self.t.runError("1-2 delete rc.confirmation:1", input="n\nn\n") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertNotIn("Deleted task 1", out) @@ -139,7 +139,7 @@ class TestBulk(TestCase): self.assertNotIn("Deleting task", out) # Test with 3 tasks, denying delete. - code, out, err = self.t.runError("1-3 delete rc.confirmation:on", input="n\nn\nn\n") + code, out, err = self.t.runError("1-3 delete rc.confirmation:1", input="n\nn\nn\n") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertNotIn("Deleted task 1", out) @@ -150,7 +150,7 @@ class TestBulk(TestCase): def test_bulk_delete_all_tests(self): """bulk delete >all deletes everything""" - code, out, err = self.t("1-3 delete rc.confirmation:on", input="all\n") + code, out, err = self.t("1-3 delete rc.confirmation:1", input="all\n") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertIn("Deleting task 1", out) @@ -161,7 +161,7 @@ class TestBulk(TestCase): def test_bulk_delete_quit_tests(self): """bulk delete >quit deletes nothing""" - code, out, err = self.t.runError("1-3 delete rc.confirmation:on", input="quit\n") + code, out, err = self.t.runError("1-3 delete rc.confirmation:1", input="quit\n") self.assertNotIn("(yes/no)", out) self.assertIn("(yes/no/all/quit)", out) self.assertIn("Deleted 0 tasks", out) diff --git a/test/encoding.t b/test/encoding.t index 94921dcfd..6fa8e84b1 100755 --- a/test/encoding.t +++ b/test/encoding.t @@ -63,7 +63,7 @@ class TestUtf8(TestCase): """Text alignment in reports with wide utf8 characters""" # Originally Bug #455 - Text alignment in reports is broken when text # contains wide utf8 characters - self.t.config("print.empty.columns", "no") + self.t.config("print.empty.columns", "0") self.t(("add", "abc", "pro:Bar\u263a")) self.t("add def pro:Foo") diff --git a/test/enpassant.t b/test/enpassant.t index 9b9923a93..493ef07df 100755 --- a/test/enpassant.t +++ b/test/enpassant.t @@ -40,7 +40,7 @@ class BaseTestEnpassant(TestCase): """Executed before each test in the class""" self.t = Task() # No journal log which may contain the words we are looking for - self.t.config("journal.info", "off") + self.t.config("journal.info", "0") class TestEnpassantMultiple(BaseTestEnpassant): @@ -84,7 +84,7 @@ class TestEnpassant(BaseTestEnpassant): def setUp(self): super(TestEnpassant, self).setUp() - self.t.config("confirmation", "off") + self.t.config("confirmation", "0") self.t("add one") self.t("add two") diff --git a/test/exec.t b/test/exec.t index 1a2772449..9eac88756 100755 --- a/test/exec.t +++ b/test/exec.t @@ -40,7 +40,7 @@ class TestBug1414(TestCase): def setUp(self): self.t = Task() self.t.config("default.command", "exec echo hello") - self.t.config("verbose", "no") + self.t.config("verbose", "0") def test_execute(self): """use execute""" diff --git a/test/feature.559.t b/test/feature.559.t index b248916d0..3b342a013 100755 --- a/test/feature.559.t +++ b/test/feature.559.t @@ -40,7 +40,7 @@ class TestFeature559(TestCase): def setUp(self): self.t = Task() - self.t.config("exit.on.missing.db", "yes") + self.t.config("exit.on.missing.db", "1") # NOTE the framework uses TASKDATA and TASKRC to tell taskwarrior where # data is stored. Since these env variables take precedence over diff --git a/test/feature.default.project.t b/test/feature.default.project.t index f997d1747..b0aca793b 100755 --- a/test/feature.default.project.t +++ b/test/feature.default.project.t @@ -131,7 +131,7 @@ class TestDefaultProject(TestCase): def test_time_default_project(self): """default.project is not applied when start/stop'ing a task""" # Allow keeping track of time spent on task - self.t.config("journal.time", "yes") + self.t.config("journal.time", "1") self.t("add foobar") code, out, err = self.t("1 info") diff --git a/test/gc.t b/test/gc.t index 49d7c2e84..436e174d1 100755 --- a/test/gc.t +++ b/test/gc.t @@ -47,14 +47,14 @@ class TestGC(TestCase): def test_gc_off_id(self): """ID retained when GC off""" - self.t.config("gc", "off") + self.t.config("gc", "0") self.t("1 done") code, out, err = self.t("gctest") self.assertRegexpMatches(out, "1\s+one", "should still have ID") def test_gc_off_mod(self): """mod by ID after done with gc off""" - self.t.config("gc", "off") + self.t.config("gc", "0") self.t("1 done") self.t("gctest") self.t("2 mod +TWO") @@ -63,7 +63,7 @@ class TestGC(TestCase): def test_gc_on_id(self): """IDs reshuffle after report when GC on""" - self.t.config("gc", "on") + self.t.config("gc", "1") self.t("1 done") self.t("2 mod +TWO") code, out, err = self.t("gctest") diff --git a/test/hyphenate.t b/test/hyphenate.t index a62482c98..15dfb4fae 100755 --- a/test/hyphenate.t +++ b/test/hyphenate.t @@ -40,7 +40,7 @@ class TestHyphenation(TestCase): """Executed before each test in the class""" self.t = Task() self.t.config("defaultwidth", "20") - self.t.config("detection", "off") + self.t.config("detection", "0") self.t.config("verbose", "nothing") def test_hyphenation_on_space(self): @@ -63,7 +63,7 @@ class TestBug804(TestCase): def test_hyphenation(self): """Verify hyphenation is controllable""" - self.t.config("print.empty.columns", "yes") + self.t.config("print.empty.columns", "1") self.t.config("report.unittest.labels", "ID,Project,Pri,Description") self.t.config("report.unittest.columns", "id,project,priority,description") self.t.config("report.unittest.filter", "status:pending") diff --git a/test/import.t b/test/import.t index 1318f72a2..311a126ff 100755 --- a/test/import.t +++ b/test/import.t @@ -192,7 +192,7 @@ class TestImport(TestCase): _data = """{"uuid":"a0000000-a000-a000-a000-a00000000000","depends":"a1111111-a111-a111-a111-a11111111111","description":"zero","project":"A","status":"pending","entry":"1234567889"}""" self.t("import", input=self.data1) self.t("import", input=_data) - self.t.config("json.depends.array", "off") + self.t.config("json.depends.array", "0") _t = self.t.export("a0000000-a000-a000-a000-a00000000000")[0] self.assertEqual(_t["depends"], "a1111111-a111-a111-a111-a11111111111") @@ -242,8 +242,8 @@ class TestImportExportRoundtrip(TestCase): self.t2 = Task() for client in (self.t1, self.t2): - client.config("dateformat", "m/d/Y") - client.config("verbose", "off") + client.config("dateformat", "m/d/Y") + client.config("verbose", "0") client.config("defaultwidth", "100") def _validate_data(self, client): diff --git a/test/project.t b/test/project.t index 6bdfcb7ad..12d6aca03 100755 --- a/test/project.t +++ b/test/project.t @@ -397,7 +397,7 @@ class TestBug899(TestCase): def setUp(self): """Executed before each test in the class""" self.t = Task() - self.t.config("verbose", "on") + self.t.config("verbose", "1") def test_log_project(self): """899: Verify task log behaves correctly when logging into a project""" diff --git a/test/rc.override.t b/test/rc.override.t index 38a208590..89d457451 100755 --- a/test/rc.override.t +++ b/test/rc.override.t @@ -40,16 +40,16 @@ class TestOverride(TestCase): def setUp(self): """Executed before each test in the class""" self.t = Task() - self.t.config("regex", "off") + self.t.config("regex", "0") self.t.config("verbose", "nothing") def test_override(self): """Verify override is displayed in 'show' command""" code, out, err = self.t("show regex") - self.assertRegexpMatches(out, r"regex +off") + self.assertRegexpMatches(out, r"regex +0") - code, out, err = self.t("rc.regex:on show regex") - self.assertRegexpMatches(out, r"regex +on") + code, out, err = self.t("rc.regex:1 show regex") + self.assertRegexpMatches(out, r"regex +1") class TestRCSegfault(TestCase): diff --git a/test/recurrence.t b/test/recurrence.t index 7e8fbfc5b..1895df312 100755 --- a/test/recurrence.t +++ b/test/recurrence.t @@ -77,7 +77,7 @@ class TestRecurrenceDisabled(TestCase): disabled. """ - self.t.config("recurrence", "no") + self.t.config("recurrence", "0") self.t("add due:today recur:daily Recurrent task.") # Trigger GC, expect no match and therefore non-zero code @@ -325,7 +325,7 @@ class TestBug955(TestCase): """ # With confirmation:off the first "n\n" has no effect. - self.t.config("confirmation", "off") + self.t.config("confirmation", "0") code, out, err = self.t("2 delete", input="n\ny\n") self.assertIn("Deleting task 2", out) self.assertIn("Deleted 1 task", out) @@ -351,7 +351,7 @@ class TestBug955(TestCase): """ # With confirmation:on the first "n\n" is obeyed. - self.t.config("confirmation", "on") + self.t.config("confirmation", "1") code, out, err = self.t.runError("2 delete", input="n\ny\n") self.assertIn("Deleted 0 tasks.", out) diff --git a/test/show.t b/test/show.t index 1631d3b55..75d831df4 100755 --- a/test/show.t +++ b/test/show.t @@ -80,7 +80,7 @@ class TestShowHelperCommand(TestCase): def test_show_helper_no_arg(self): """Verify _show command lists all with no arg provided""" code, out, err = self.t("_show") - self.assertIn("debug=no\n", out) + self.assertIn("debug=0\n", out) self.assertIn("verbose=", out) diff --git a/test/special.t b/test/special.t index bc5cd5f65..496bd4ce4 100755 --- a/test/special.t +++ b/test/special.t @@ -47,7 +47,7 @@ class TestSpecialTags(TestCase): cls.t.config("color.pri.H", "") cls.t.config("color.completed", "") cls.t.config("nag", "NAG") - cls.t.config("color", "on") + cls.t.config("color", "1") cls.t.config("_forcecolor", "1") def test_nocolor(self): diff --git a/test/start.t b/test/start.t index 63befe283..cb439d0aa 100755 --- a/test/start.t +++ b/test/start.t @@ -69,7 +69,7 @@ class TestStart(TestCase): def test_journal_time(self): """Verify journal.time tracks state""" - self.t.config("journal.time", "on") + self.t.config("journal.time", "1") self.t("add one") self.t("1 start") @@ -82,7 +82,7 @@ class TestStart(TestCase): def test_journal_annotations(self): """Verify journal start/stop annotations are used""" - self.t.config("journal.time", "on") + self.t.config("journal.time", "1") self.t.config("journal.time.start.annotation", "Nu kör vi") self.t.config("journal.time.stop.annotation", "Nu stannar vi") diff --git a/test/substitute.t b/test/substitute.t index 0836ac182..bc527508c 100755 --- a/test/substitute.t +++ b/test/substitute.t @@ -43,7 +43,7 @@ class TestSubstitutions(TestCase): def test_substitution(self): """Verify substitution for task description""" - self.t.config("regex", "off") + self.t.config("regex", "0") self.t("add foo foo foo") self.t("1 modify /foo/FOO/") @@ -78,7 +78,7 @@ class TestSubstitutions(TestCase): def test_substitution_regex(self): """Verify regex substitution for task description""" - self.t.config("regex", "on") + self.t.config("regex", "1") self.t("add aaa bbb") self.t("1 modify /b{3}/BbB/") code, out, err = self.t("_get 1.description") diff --git a/test/sugar.t b/test/sugar.t index 9154baf36..bb7b950ad 100755 --- a/test/sugar.t +++ b/test/sugar.t @@ -50,7 +50,7 @@ class TestSugar(TestCase): self.assertIn("two", out) self.assertNotIn("three", out) - self.t.config("sugar", "off") + self.t.config("sugar", "0") code, out, err = self.t("1 2 count") self.assertEqual(0, int(out)) @@ -64,7 +64,7 @@ class TestSugar(TestCase): self.assertIn("three", out) # sugar off: WYSIWYG parsing. - self.t.config("sugar", "off") + self.t.config("sugar", "0") code, out, err = self.t("3 and '( 2 three )' count") self.assertEqual(0, int(out)) diff --git a/test/tdb2.t.cpp b/test/tdb2.t.cpp index 933a6fe84..afcb6d2af 100644 --- a/test/tdb2.t.cpp +++ b/test/tdb2.t.cpp @@ -52,8 +52,8 @@ int main (int, char**) unlink ("./backlog.data"); // Set the context to allow GC. - context.config.set ("gc", "on"); - context.config.set ("debug", "on"); + context.config.set ("gc", 1); + context.config.set ("debug", 1); context.tdb2.set_location ("."); diff --git a/test/urgency.t b/test/urgency.t index e7e6f7b8d..ae7ab5cf3 100755 --- a/test/urgency.t +++ b/test/urgency.t @@ -54,7 +54,7 @@ class TestUrgency(TestCase): cls.t.config("urgency.user.tag.next.coefficient", "10") cls.t.config("urgency.user.project.PROJECT.coefficient", "10") cls.t.config("urgency.user.tag.TAG.coefficient", "10") - cls.t.config("confirmation", "off") + cls.t.config("confirmation", "0") cls.t("add control") # 1 diff --git a/test/urgency_inherit.t b/test/urgency_inherit.t index 66e3eee77..fe8058d4d 100755 --- a/test/urgency_inherit.t +++ b/test/urgency_inherit.t @@ -62,16 +62,16 @@ class TestUrgencyInherit(TestCase): def test_urgency_inherit_off(self): """No urgency inheritance when switched off""" - self.t.config("urgency.inherit", "off") + self.t.config("urgency.inherit", "0") tl = self.get_tasks() self.assertTrue(tl[1]["urgency"] <= tl[2]["urgency"] < tl[3]["urgency"]) def test_gc_off_mod(self): """Biggest urgency is inherited recursively""" - self.t.config("urgency.inherit", "off") + self.t.config("urgency.inherit", "0") tl = self.get_tasks() oldmax = max(tl[1]["urgency"], tl[2]["urgency"], tl[3]["urgency"]) - self.t.config("urgency.inherit", "on") + self.t.config("urgency.inherit", "1") tl = self.get_tasks() self.assertTrue(oldmax <= tl[3]["urgency"]) self.assertTrue(tl[1]["urgency"] >= tl[2]["urgency"] >= tl[3]["urgency"]) diff --git a/test/verbose.t b/test/verbose.t index eb3607500..27378528d 100755 --- a/test/verbose.t +++ b/test/verbose.t @@ -41,7 +41,7 @@ from basetest import Task, TestCase class TestVerbosity(TestCase): def setUp(self): self.t = Task() - self.t.config("print.empty.columns", "yes") + self.t.config("print.empty.columns", "1") self.t("add Sample")