mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Added error handling test for column/label mismatch
This commit is contained in:
parent
34d5a07d90
commit
cebece6d23
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue