taskwarrior/test/basetest
Dustin J. Mitchell fdb7e5e020
Test for unusual task data (#3770)
* Test for unusual task data

A task might have any combination of keys and values, but Taskwarrior
often assumes that only valid values can occur, and crashes otherwise.
This is highly inconvenient, as it's often impossible to do anything
with the invalid task -- Taskwarrior just fails without modifying it.

So, this is the beginning of some testing for such invalid tasks, with
the goal of making Taskwarrior due something reasonable. In general, an
invalid attribute value is treated as if it was not set. This is not
exhaustive, and there are likely still bugs of this sort, but as we find
them we can fix and add regression tests to this script.

This introduces a new test-only binary that creates a "bare" task using
TaskChampion, avoiding Taskwarrior's efforts to not create "unusual"
tasks.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-05 08:20:35 -05:00
..
__init__.py Remove encoding declaration in Python files (#3568) 2024-07-26 23:36:23 -04:00
CMakeLists.txt add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
compat.py Remove encoding declaration in Python files (#3568) 2024-07-26 23:36:23 -04:00
exceptions.py add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
hooks.py add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
meta.py add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
README Sync against taskchampion-sync-server (#3118) 2023-07-08 10:27:33 -04:00
task.py add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
testing.py add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
utils.py Test for unusual task data (#3770) 2025-02-05 08:20:35 -05:00

Shell environment variables that affect how and what tests are executed:

TASKW_SKIP -> Causes any test that needs Taskwarrior (task binary only) to be skipped (TestCase)

TASK_USE_PATH -> Causes tests to look for "task" in PATH instead of the default location