From 0a3017bf90e48db81c74d029c3e6cf980df9df78 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 23 Sep 2008 00:53:17 +0100 Subject: [PATCH] first hint of tests for configfile --- terminatorlib/tests.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/terminatorlib/tests.py b/terminatorlib/tests.py index 7049d671..e8488847 100644 --- a/terminatorlib/tests.py +++ b/terminatorlib/tests.py @@ -50,3 +50,25 @@ class test_config(): assert store['titletips'] == False assert store['enable_real_transparency'] == False # until the bug is fixed +class test_configfile(): + configfile = None + + def setup (self): + import configfile + self.configfile = configfile + + def test_ConfigSyntaxError (self): + class _testcf (): + errors_are_fatal = False + filename = 'test_filename' + _lnum = 123456789 + _pos = 5 + _line = ' test line ' + + testcf = _testcf () + testobject = self.configfile.ConfigSyntaxError ('test_message', testcf) + assert str(testobject) == ''' * test_message, line 123456789: + test line + -----^ +''' +