- TW-1486 task wait shows completed tasks which has a wait attribute (thanks to
          Sujeevan Vijayakumaran).
This commit is contained in:
Paul Beckingham 2015-01-03 09:31:54 -05:00
parent 2c986d6e6b
commit dad0ac0c27
4 changed files with 39 additions and 1 deletions

View file

@ -240,3 +240,4 @@ suggestions:
Arnoud K
Ozgur Akgun
David Costa
Sujeevan Vijayakumaran

View file

@ -1,5 +1,8 @@
2.4.1 () -
- TW-1486 task wait shows completed tasks which has a wait attribute (thanks to
Sujeevan Vijayakumaran).
------ current release ---------------------------
2.4.0 (2015-01-01) 670102842c39bdc62ef84ae4b679a8f5a2d89523

View file

@ -1112,10 +1112,10 @@ bool Task::hasTag (const std::string& tag) const
if (tag == "SCHEDULED") return has ("scheduled");
if (tag == "CHILD") return has ("parent");
if (tag == "UNTIL") return has ("until");
if (tag == "WAITING") return has ("wait");
if (tag == "ANNOTATED") return hasAnnotations ();
if (tag == "TAGGED") return has ("tags");
if (tag == "PARENT") return has ("mask");
if (tag == "WAITING") return get ("status") == "waiting";
if (tag == "PENDING") return get ("status") == "pending";
if (tag == "COMPLETED") return get ("status") == "completed";
if (tag == "DELETED") return get ("status") == "deleted";

34
test/tw-1486.t Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import sys
import os
from datetime import datetime
import unittest
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from basetest import Task, TestCase, Taskd, ServerTestCase
class Test1486(TestCase):
def setUp(self):
self.t = Task()
def test_waiting(self):
"""Verify waiting report shows waiting tasks"""
self.t.config('uda.sep.type', 'string')
self.t(('add', 'regular'))
self.t(('add', 'waited', 'wait:later'))
code, out, err = self.t(('waiting',))
self.assertEqual(0, code, "Exit code was non-zero ({0})".format(code))
self.assertIn('waited', out)
self.assertNotIn('regular', out)
if __name__ == "__main__":
from simpletap import TAPTestRunner
unittest.main(testRunner=TAPTestRunner())
# vim: ai sts=4 et sw=4