mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Refactor to store dependencies as individual attributes
This also drops support for the transitional `json.depends.array` configuration value, which has not been necessary since ~2016. As with tags, dependencies are stored in both a "combined", comma-separated format (for compatibility) and in an attribute-per-dependency format (for the future).
This commit is contained in:
parent
413b8d22b7
commit
20af583e21
10 changed files with 131 additions and 123 deletions
|
@ -146,7 +146,6 @@ class TestExportCommand(TestCase):
|
|||
self.t(('add', 'everything depends on me task'))
|
||||
self.t(('add', 'wrong, everything depends on me task'))
|
||||
self.t('1 modify depends:2,3')
|
||||
self.t.config('json.depends.array', 'on')
|
||||
|
||||
deps = self.export(1)['depends']
|
||||
self.assertType(deps, list)
|
||||
|
@ -155,19 +154,6 @@ class TestExportCommand(TestCase):
|
|||
for uuid in deps:
|
||||
self.assertString(uuid, UUID_REGEXP, regexp=True)
|
||||
|
||||
def test_export_depends_oldformat(self):
|
||||
self.t(('add', 'everything depends on me task'))
|
||||
self.t(('add', 'wrong, everything depends on me task'))
|
||||
self.t('1 modify depends:2,3')
|
||||
|
||||
code, out, err = self.t("rc.json.array=off rc.json.depends.array=off 1 export")
|
||||
deps = json.loads(out)["depends"]
|
||||
self.assertString(deps)
|
||||
self.assertEqual(len(deps.split(",")), 2)
|
||||
|
||||
for uuid in deps.split(','):
|
||||
self.assertString(uuid, UUID_REGEXP, regexp=True)
|
||||
|
||||
def test_export_urgency(self):
|
||||
self.t('add urgent task +urgent')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue