Merge pull request #9 in TM/task from ~UNODE/task:2.4.0 to 2.4.0

* commit '6007da7218719826446af65affdfb93407cae995':
  Unittest - Renumber bug 1377 and strip leftover comments
  Unittest - No need to check for exit code as it's already implicit
This commit is contained in:
Paul Beckingham
2014-07-15 13:59:05 +00:00
3 changed files with 3 additions and 8 deletions

View File

@@ -40,8 +40,7 @@ class TestBug1359(TestCase):
def test_add_hyphenated(self): def test_add_hyphenated(self):
""""one-two-three" in description triggers Malformed ID error""" """"one-two-three" in description triggers Malformed ID error"""
code, out, err = self.t(("add", "one-two-three.ca")) self.t(("add", "one-two-three.ca"))
self.assertEqual(code, 0)
code, out, err = self.t(("1", "info")) code, out, err = self.t(("1", "info"))
self.assertIn("one-two-three.ca", out) self.assertIn("one-two-three.ca", out)

View File

@@ -29,15 +29,13 @@
import sys import sys
import os import os
import unittest import unittest
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from basetest import Task, TestCase from basetest import Task, TestCase
class TestBugNumber(TestCase): class TestBug1377(TestCase):
def setUp(self): def setUp(self):
"""Executed before each test in the class"""
self.t = Task() self.t = Task()
def test_bad_tag_parser(self): def test_bad_tag_parser(self):
@@ -52,7 +50,6 @@ class TestBugNumber(TestCase):
if __name__ == "__main__": if __name__ == "__main__":
from simpletap import TAPTestRunner from simpletap import TAPTestRunner
#unittest.main()
unittest.main(testRunner=TAPTestRunner()) unittest.main(testRunner=TAPTestRunner())
# vim: ai sts=4 et sw=4 # vim: ai sts=4 et sw=4

View File

@@ -42,8 +42,7 @@ class TestBug268(TestCase):
"""escaped backslashes do not work with 'modify'""" """escaped backslashes do not work with 'modify'"""
self.t(("add", "a", "b", "or", "c")) self.t(("add", "a", "b", "or", "c"))
code, out, err = self.t(("1", "modify", "/a\\ b/a\\/b/")) self.t(("1", "modify", "/a\\ b/a\\/b/"))
self.assertEqual(code, 0)
code, out, err = self.t(("1", "info")) code, out, err = self.t(("1", "info"))
self.assertIn("a/b or c", out) self.assertIn("a/b or c", out)