Test: Added error handling test for column/label mismatch

This commit is contained in:
Paul Beckingham 2015-10-28 17:45:48 -04:00
parent 34d5a07d90
commit cebece6d23

View file

@ -36,7 +36,6 @@ from basetest import Task, TestCase
class TestCustomReports(TestCase):
def setUp(self):
"""Executed before each test in the class"""
self.t = Task()
@ -66,6 +65,16 @@ class TestCustomReports(TestCase):
self.assertIn("ID", out)
self.assertIn("DESCRIPTION", out)
class TestCustomErrorHandling(TestCase):
def setUp(self):
self.t = Task()
def test_size_mismatch(self):
self.t.config("report.foo.columns", "id,description")
self.t.config("report.foo.labels", "id")
code, out, err = self.t.runError("foo")
self.assertIn("There are different numbers of columns and labels for report 'foo'.", err)
if __name__ == "__main__":
from simpletap import TAPTestRunner