mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Merged tw-1262.t into dependencies.t
This commit is contained in:
parent
f4ba6015a8
commit
6f926e6bea
2 changed files with 39 additions and 57 deletions
|
@ -231,6 +231,45 @@ class TestBug697(TestCase):
|
|||
self.assertEqual("BLOCKED\n", out)
|
||||
|
||||
|
||||
@unittest.skip("WaitingFor TW-1262")
|
||||
class TestBug1262(TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.t = Task()
|
||||
|
||||
cls.t('add "Buy oranges"')
|
||||
cls.t('add "Buy apples"')
|
||||
|
||||
cls.DEPS = ("1", "2")
|
||||
cls.t("add dep:" + ",".join(cls.DEPS) + '"Make fruit salad!"')
|
||||
|
||||
def test_dependency_contains_matches_ID(self):
|
||||
"""dep.contains matches task IDs"""
|
||||
# NOTE: A more robust test is needed as alternative to this
|
||||
# If it happens that the UUID doesn't contain a 1 nor a 2 the test will
|
||||
# fail, which means it's actually using the UUID.
|
||||
# Still, it passes on most cases. Which is WRONG!.
|
||||
for char in self.DEPS:
|
||||
self.t("list dep.contains:{0}".format(char))
|
||||
|
||||
def test_dependency_contains_not_matches_other(self):
|
||||
"""dep.contains matches other characters not present in ID nor UUID"""
|
||||
for char in set(string.letters).difference(string.hexdigits):
|
||||
self.t.runError("list dep.contains:{0}".format(char))
|
||||
|
||||
def test_dependency_contains_not_UUID(self):
|
||||
"""dep.contains matches characters in the tasks' UUIDs"""
|
||||
# Get the UUID of the task with description "Buy"
|
||||
code, out, err = self.t("uuid Buy")
|
||||
|
||||
# Get only characters that show up in the UUID
|
||||
uuid = {chr for chr in out.splitlines()[0] if chr in string.hexdigits}
|
||||
|
||||
for char in uuid:
|
||||
if char not in self.DEPS:
|
||||
self.t.runError("list dep.contains:{0}".format(char))
|
||||
|
||||
|
||||
# TODO - test dependency.confirmation config variable
|
||||
# TODO - test undo on backing out chain gap repair
|
||||
# TODO - test undo on backing out choice to not perform chain gap repair
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue