[ 54s] =================================== FAILURES ===================================
[ 54s] ______________________ TestDBShellout.test_filtering_plus ______________________
[ 54s]
[ 54s] self = <taskw.test.test_datas.TestDBShellout object at 0x7f8a8a572940>
[ 54s]
[ 54s] def test_filtering_plus(self):
[ 54s] self.tw.task_add("foobar1")
[ 54s] self.tw.task_add("foobar2")
[ 54s] self.tw.task_add("foobar+")
[ 54s] tasks = self.tw.filter_tasks({
[ 54s] > 'description.contains': 'foobar+',
[ 54s] })
[ 54s]
[ 54s] taskw/test/test_datas.py:386:
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s] taskw/warrior.py:620: in filter_tasks
[ 54s] *query_args
[ 54s] taskw/warrior.py:513: in _get_task_objects
[ 54s] json = self._get_json(*args)
[ 54s] taskw/warrior.py:510: in _get_json
[ 54s] return json.loads(self._execute(*args)[0])
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s]
[ 54s] self = <taskw.warrior.TaskWarriorShellout object at 0x7f8a8a5724a8>
[ 54s] args = ('export', 'description.contains:foobar\\+')
[ 54s] command = [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', ...]
[ 54s] env = {'COLORTERM': '1', 'CPU': 'x86_64', 'CSHEDIT': 'emacs', 'FORCE_SOURCE_DATE': '1', ...}
[ 54s] i = 7
[ 54s]
[ 54s] def _execute(self, *args):
[ 54s] """ Execute a given taskwarrior command with arguments
[ 54s]
[ 54s] Returns a 2-tuple of stdout and stderr (respectively).
[ 54s]
[ 54s] """
[ 54s] command = (
[ 54s] [
[ 54s] 'task',
[ 54s] ]
[ 54s] + self.get_configuration_override_args()
[ 54s] + [six.text_type(arg) for arg in args]
[ 54s] )
[ 54s] env = os.environ.copy()
[ 54s] env['TASKRC'] = self.config_filename
[ 54s]
[ 54s] # subprocess is expecting bytestrings only, so nuke unicode if present
[ 54s] # and remove control characters
[ 54s] for i in range(len(command)):
[ 54s] if isinstance(command[i], six.text_type):
[ 54s] command[i] = (
[ 54s] taskw.utils.clean_ctrl_chars(command[i].encode('utf-8')))
[ 54s]
[ 54s] try:
[ 54s] proc = subprocess.Popen(
[ 54s] command,
[ 54s] env=env,
[ 54s] stdout=subprocess.PIPE,
[ 54s] stderr=subprocess.PIPE,
[ 54s] )
[ 54s] stdout, stderr = proc.communicate()
[ 54s] except FileNotFoundError:
[ 54s] raise FileNotFoundError(
[ 54s] "Unable to find the 'task' command-line tool."
[ 54s] )
[ 54s]
[ 54s] if proc.returncode != 0:
[ 54s] > raise TaskwarriorError(command, stderr, stdout, proc.returncode)
[ 54s] E taskw.exceptions.TaskwarriorError: [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', b'export', b'description.contains:foobar\\+'] #2; stderr:"b'The expression could not be evaluated.'"; stdout:"b''"
[ 54s]
[ 54s] taskw/warrior.py:484: TaskwarriorError
[ 54s] _____________________ TestDBShellout.test_filtering_minus ______________________
[ 54s]
[ 54s] self = <taskw.test.test_datas.TestDBShellout object at 0x7f8a8a4a4748>
[ 54s]
[ 54s] def test_filtering_minus(self):
[ 54s] self.tw.task_add("foobar1")
[ 54s] self.tw.task_add("foobar2")
[ 54s] self.tw.task_add("foobar-")
[ 54s] tasks = self.tw.filter_tasks({
[ 54s] > 'description.contains': 'foobar-',
[ 54s] })
[ 54s]
[ 54s] taskw/test/test_datas.py:396:
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s] taskw/warrior.py:620: in filter_tasks
[ 54s] *query_args
[ 54s] taskw/warrior.py:513: in _get_task_objects
[ 54s] json = self._get_json(*args)
[ 54s] taskw/warrior.py:510: in _get_json
[ 54s] return json.loads(self._execute(*args)[0])
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s]
[ 54s] self = <taskw.warrior.TaskWarriorShellout object at 0x7f8a8a4a47f0>
[ 54s] args = ('export', 'description.contains:foobar-')
[ 54s] command = [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', ...]
[ 54s] env = {'COLORTERM': '1', 'CPU': 'x86_64', 'CSHEDIT': 'emacs', 'FORCE_SOURCE_DATE': '1', ...}
[ 54s] i = 7
[ 54s]
[ 54s] def _execute(self, *args):
[ 54s] """ Execute a given taskwarrior command with arguments
[ 54s]
[ 54s] Returns a 2-tuple of stdout and stderr (respectively).
[ 54s]
[ 54s] """
[ 54s] command = (
[ 54s] [
[ 54s] 'task',
[ 54s] ]
[ 54s] + self.get_configuration_override_args()
[ 54s] + [six.text_type(arg) for arg in args]
[ 54s] )
[ 54s] env = os.environ.copy()
[ 54s] env['TASKRC'] = self.config_filename
[ 54s]
[ 54s] # subprocess is expecting bytestrings only, so nuke unicode if present
[ 54s] # and remove control characters
[ 54s] for i in range(len(command)):
[ 54s] if isinstance(command[i], six.text_type):
[ 54s] command[i] = (
[ 54s] taskw.utils.clean_ctrl_chars(command[i].encode('utf-8')))
[ 54s]
[ 54s] try:
[ 54s] proc = subprocess.Popen(
[ 54s] command,
[ 54s] env=env,
[ 54s] stdout=subprocess.PIPE,
[ 54s] stderr=subprocess.PIPE,
[ 54s] )
[ 54s] stdout, stderr = proc.communicate()
[ 54s] except FileNotFoundError:
[ 54s] raise FileNotFoundError(
[ 54s] "Unable to find the 'task' command-line tool."
[ 54s] )
[ 54s]
[ 54s] if proc.returncode != 0:
[ 54s] > raise TaskwarriorError(command, stderr, stdout, proc.returncode)
[ 54s] E taskw.exceptions.TaskwarriorError: [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', b'export', b'description.contains:foobar-'] #2; stderr:"b'The expression could not be evaluated.'"; stdout:"b''"
[ 54s]
[ 54s] taskw/warrior.py:484: TaskwarriorError
[ 54s] _____________________ TestDBShellout.test_filtering_slash ______________________
[ 54s]
[ 54s] self = <taskw.test.test_datas.TestDBShellout object at 0x7f8a8a3b55f8>
[ 54s]
[ 54s] def test_filtering_slash(self):
[ 54s] self.tw.task_add("foobar1")
[ 54s] self.tw.task_add("foobar2")
[ 54s] self.tw.task_add("foo/bar")
[ 54s] tasks = self.tw.filter_tasks({
[ 54s] > 'description.contains': 'foo/bar',
[ 54s] })
[ 54s]
[ 54s] taskw/test/test_datas.py:454:
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s] taskw/warrior.py:620: in filter_tasks
[ 54s] *query_args
[ 54s] taskw/warrior.py:513: in _get_task_objects
[ 54s] json = self._get_json(*args)
[ 54s] taskw/warrior.py:510: in _get_json
[ 54s] return json.loads(self._execute(*args)[0])
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s]
[ 54s] self = <taskw.warrior.TaskWarriorShellout object at 0x7f8a8a3b52e8>
[ 54s] args = ('export', 'description.contains:foo/bar')
[ 54s] command = [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', ...]
[ 54s] env = {'COLORTERM': '1', 'CPU': 'x86_64', 'CSHEDIT': 'emacs', 'FORCE_SOURCE_DATE': '1', ...}
[ 54s] i = 7
[ 54s]
[ 54s] def _execute(self, *args):
[ 54s] """ Execute a given taskwarrior command with arguments
[ 54s]
[ 54s] Returns a 2-tuple of stdout and stderr (respectively).
[ 54s]
[ 54s] """
[ 54s] command = (
[ 54s] [
[ 54s] 'task',
[ 54s] ]
[ 54s] + self.get_configuration_override_args()
[ 54s] + [six.text_type(arg) for arg in args]
[ 54s] )
[ 54s] env = os.environ.copy()
[ 54s] env['TASKRC'] = self.config_filename
[ 54s]
[ 54s] # subprocess is expecting bytestrings only, so nuke unicode if present
[ 54s] # and remove control characters
[ 54s] for i in range(len(command)):
[ 54s] if isinstance(command[i], six.text_type):
[ 54s] command[i] = (
[ 54s] taskw.utils.clean_ctrl_chars(command[i].encode('utf-8')))
[ 54s]
[ 54s] try:
[ 54s] proc = subprocess.Popen(
[ 54s] command,
[ 54s] env=env,
[ 54s] stdout=subprocess.PIPE,
[ 54s] stderr=subprocess.PIPE,
[ 54s] )
[ 54s] stdout, stderr = proc.communicate()
[ 54s] except FileNotFoundError:
[ 54s] raise FileNotFoundError(
[ 54s] "Unable to find the 'task' command-line tool."
[ 54s] )
[ 54s]
[ 54s] if proc.returncode != 0:
[ 54s] > raise TaskwarriorError(command, stderr, stdout, proc.returncode)
[ 54s] E taskw.exceptions.TaskwarriorError: [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', b'export', b'description.contains:foo/bar'] #2; stderr:"b'Cannot divide real numbers by strings'"; stdout:"b''"
[ 54s]
[ 54s] taskw/warrior.py:484: TaskwarriorError
[ 54s] ___________________ TestDBShellout.test_annotation_escaping ____________________
[ 54s]
[ 54s] self = <taskw.test.test_datas.TestDBShellout object at 0x7f8a8a56e358>
[ 54s]
[ 54s] def test_annotation_escaping(self):
[ 54s] original = {'description': 're-opening the issue'}
[ 54s]
[ 54s] self.tw.task_add('foobar')
[ 54s] task = self.tw.load_tasks()['pending'][0]
[ 54s] task['annotations'] = [original]
[ 54s] self.tw.task_update(task)
[ 54s]
[ 54s] task = self.tw.load_tasks()['pending'][0]
[ 54s] > self.tw.task_update(task)
[ 54s]
[ 54s] taskw/test/test_datas.py:509:
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s] taskw/warrior.py:809: in task_update
[ 54s] self._execute(task_uuid, 'modify', *modification)
[ 54s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 54s]
[ 54s] self = <taskw.warrior.TaskWarriorShellout object at 0x7f8a8a56e908>
[ 54s] args = ('093fbfd8-c3cd-42fc-8609-0977bb616551', 'modify', 'description:"foobar"', 'entry:"20210724T013854Z"', 'modified:"20210724T013854Z"', 'status:"pending"', ...)
[ 54s] command = [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', ...]
[ 54s] env = {'COLORTERM': '1', 'CPU': 'x86_64', 'CSHEDIT': 'emacs', 'FORCE_SOURCE_DATE': '1', ...}
[ 54s] i = 12
[ 54s]
[ 54s] def _execute(self, *args):
[ 54s] """ Execute a given taskwarrior command with arguments
[ 54s]
[ 54s] Returns a 2-tuple of stdout and stderr (respectively).
[ 54s]
[ 54s] """
[ 54s] command = (
[ 54s] [
[ 54s] 'task',
[ 54s] ]
[ 54s] + self.get_configuration_override_args()
[ 54s] + [six.text_type(arg) for arg in args]
[ 54s] )
[ 54s] env = os.environ.copy()
[ 54s] env['TASKRC'] = self.config_filename
[ 54s]
[ 54s] # subprocess is expecting bytestrings only, so nuke unicode if present
[ 54s] # and remove control characters
[ 54s] for i in range(len(command)):
[ 54s] if isinstance(command[i], six.text_type):
[ 54s] command[i] = (
[ 54s] taskw.utils.clean_ctrl_chars(command[i].encode('utf-8')))
[ 54s]
[ 54s] try:
[ 54s] proc = subprocess.Popen(
[ 54s] command,
[ 54s] env=env,
[ 54s] stdout=subprocess.PIPE,
[ 54s] stderr=subprocess.PIPE,
[ 54s] )
[ 54s] stdout, stderr = proc.communicate()
[ 54s] except FileNotFoundError:
[ 54s] raise FileNotFoundError(
[ 54s] "Unable to find the 'task' command-line tool."
[ 54s] )
[ 54s]
[ 54s] if proc.returncode != 0:
[ 54s] > raise TaskwarriorError(command, stderr, stdout, proc.returncode)
[ 54s] E taskw.exceptions.TaskwarriorError: [b'task', b'rc.verbose=new-uuid', b'rc.json.array=TRUE', b'rc.confirmation=no', b'rc.dependency.confirmation=no', b'rc.recurrence.confirmation=no', b'093fbfd8-c3cd-42fc-8609-0977bb616551', b'modify', b'description:"foobar"', b'entry:"20210724T013854Z"', b'modified:"20210724T013854Z"', b'status:"pending"', b'urgency:"0.8"'] #2; stderr:"b"The 'urgency' attribute does not allow a value of '0.8'.""; stdout:"b''"
[ 54s]
[ 54s] taskw/warrior.py:484: TaskwarriorError
[ 54s] =========================== short test summary info ============================
[ 54s] FAILED taskw/test/test_datas.py::TestDBShellout::test_filtering_plus - taskw....
[ 54s] FAILED taskw/test/test_datas.py::TestDBShellout::test_filtering_minus - taskw...
[ 54s] FAILED taskw/test/test_datas.py::TestDBShellout::test_filtering_slash - taskw...
[ 54s] FAILED taskw/test/test_datas.py::TestDBShellout::test_annotation_escaping - t...
[ 54s] ======================== 4 failed, 147 passed in 9.55s =========================