TW-1734: calendar gives an error when context is set

- Thanks to Simon Michael.
This commit is contained in:
Paul Beckingham 2016-01-11 22:44:47 -05:00
parent 60667dbcaa
commit d564aac978
3 changed files with 13 additions and 1 deletions

View file

@ -31,6 +31,7 @@
- TW-1729 zsh completion: zregexparse:4: not enough regex argument (thanks to
Daniel Shahaf).
- TW-1733 taskwarrior 2.5.0 can not compile FreeBSD 10.1 (thanks to ribbon).
- TW-1734 calendar gives an error when context is set (thanks to Simon Michael).
- TW-1735 context with no subcommand should do something (thanks to Simon
Michael).
- TW-1736 Error on detection of BOM in files.

View file

@ -49,7 +49,7 @@ CmdCalendar::CmdCalendar ()
_read_only = true;
_displays_id = true;
_needs_gc = true;
_uses_context = true;
_uses_context = false;
_accepts_filter = false;
_accepts_modifications = false;
_accepts_miscellaneous = true;

View file

@ -534,6 +534,17 @@ class ContextErrorHandling(TestCase):
code, out, err = self.t("context show")
self.assertIn("No context is currently applied.", out)
class TestBug1734(TestCase):
def setUp(self):
self.t = Task()
self.t("add zero")
self.t("add one +tag")
self.t("context define foo +tag", input="y\n")
def test_calendar(self):
"""The 'calendar' command should not fail when a context is active"""
code, out, err = self.t("calendar")
# TODO Prove context does not interfere with export
# TODO Prove context does not interfere with undo