]> git.madduck.net Git - etc/taskwarrior.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge branch 'release/0.12.1'
authorRob Golding <rob@robgolding.com>
Sat, 13 Feb 2016 23:19:58 +0000 (23:19 +0000)
committerRob Golding <rob@robgolding.com>
Sat, 13 Feb 2016 23:19:58 +0000 (23:19 +0000)
.coveragerc
.travis.yml
docs/conf.py
setup.py
tasklib/backends.py
tasklib/lazy.py
tasklib/tests.py

index aa6418a4cc3b386a82b4699a21762f011799ea99..264003ad35242644d63df656d4055535153b7aed 100644 (file)
@@ -1,2 +1,5 @@
 [report]
 omit = */tests.py
+exclude_lines =
+    raise NotImplementedError
+    @abc.abstractmethod
index f57978793963f4e0730ead4aa5fb747a678a529f..721c53080cafc612fffd88c91852acc8a21ec07a 100644 (file)
@@ -10,7 +10,7 @@ env:
   - TASK_VERSION=v2.4.3
   - TASK_VERSION=v2.4.4
   - TASK_VERSION=v2.5.0
-  - TASK_VERSION=v2.5.1
+  - TASK_VERSION=2.5.1
 python:
   - "2.7"
   - "3.3"
index 9b679e0b654132d6c0247c8844f6578f149c1b29..d1a1ce111c3316b0341df016ec55928f3e77a181 100644 (file)
@@ -51,9 +51,9 @@ copyright = u'2014, Rob Golding'
 # built documents.
 #
 # The short X.Y version.
-version = '0.12.0'
+version = '0.12.1'
 # The full version, including alpha/beta/rc tags.
-release = '0.12.0'
+release = '0.12.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index eea019722320c30d94feb836968fc90b399763a5..b7ebe9cbfe271fcb9e4d5ab6f7f9766edd68086b 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 
 install_requirements = ['six==1.5.2', 'pytz', 'tzlocal']
 
-version = '0.12.0'
+version = '0.12.1'
 
 try:
     import importlib
index 76fce88054d53e2a9b5b89e83ee4be9e8125d7ae..6e7d91815180d0f357bc3759ff867c6da7056615 100644 (file)
@@ -323,8 +323,10 @@ class TaskWarrior(Backend):
             id_lines = [l for l in output if l.startswith('Created task ')]
 
             # Complain loudly if it seems that more tasks were created
-            # Should not happen
-            if len(id_lines) != 1 or len(id_lines[0].split(' ')) != 3:
+            # Should not happen.
+            # Expected output: Created task 1.
+            #                  Created task 1 (recurrence template).
+            if len(id_lines) != 1 or len(id_lines[0].split(' ')) not in (3, 5):
                 raise TaskWarriorException("Unexpected output when creating "
                                            "task: %s" % '\n'.join(id_lines))
 
index aa2c0654c23f93e2b361bf286c27d677e05b52a2..a1b63ef4fcf48ce1dfb881564b408f77a0374207 100644 (file)
@@ -42,6 +42,12 @@ class LazyUUIDTask(object):
     def __repr__(self):
         return "LazyUUIDTask: {0}".format(self._uuid)
 
+    def __copy__(self):
+        return LazyUUIDTask(self._tw, self._uuid)
+
+    def __deepcopy__(self, memo):
+        return LazyUUIDTask(self._tw, self._uuid)
+
     @property
     def saved(self):
         """
index b0e342d8348ddd9e451d78d9ecf7f16887e9b5af..be54504a5b69b2368bdabb116dfa215839ab2565 100644 (file)
@@ -781,6 +781,14 @@ class TaskFromHookTest(TasklibTest):
         '"start":"20141119T152233Z",'
         '"uuid":"a360fc44-315c-4366-b70c-ea7e7520b749"}')
 
+    input_add_data_recurring = six.StringIO(
+        '{"description":"Mow the lawn",'
+        '"entry":"20160210T224304Z",'
+        '"parent":"62da6227-519c-42c2-915d-dccada926ad7",'
+        '"recur":"weekly",'
+        '"status":"pending",'
+        '"uuid":"81305335-0237-49ff-8e87-b3cdc2369cec"}')
+
     input_modify_data = six.StringIO(input_add_data.getvalue() + '\n' +
         '{"description":"Buy some milk finally",'
         '"entry":"20141118T050231Z",'
@@ -797,6 +805,12 @@ class TaskFromHookTest(TasklibTest):
         self.assertEqual(t['description'], "Buy some milk")
         self.assertEqual(t.pending, True)
 
+    def test_setting_up_from_add_hook_input_recurring(self):
+        t = Task.from_input(input_file=self.input_add_data_recurring,
+                            backend=self.tw)
+        self.assertEqual(t['description'], "Mow the lawn")
+        self.assertEqual(t.pending, True)
+
     def test_setting_up_from_modified_hook_input(self):
         t = Task.from_input(input_file=self.input_modify_data, modify=True,
                             backend=self.tw)