Fixed/added some config parsing tests
This commit is contained in:
@@ -15,6 +15,7 @@ class SettingsTest(unittest.TestCase):
|
||||
things = s.get_render_things()
|
||||
# no exceptions so far. that's good
|
||||
self.assertEquals(things['world']['bgcolor'], (26,26,26,0))
|
||||
self.assertEquals(things['otherworld']['bgcolor'], (255,255,255,0))
|
||||
|
||||
def test_rendermode_validation(self):
|
||||
s = configParser.MultiWorldParser("test/data/settings/settings_test_rendermode.py")
|
||||
@@ -22,5 +23,12 @@ class SettingsTest(unittest.TestCase):
|
||||
|
||||
self.assertRaises(ValidationException,s.validate)
|
||||
|
||||
def test_bgcolor_validation(self):
|
||||
s = configParser.MultiWorldParser("test/data/settings/settings_test_bgcolor.py")
|
||||
s.parse()
|
||||
|
||||
self.assertRaises(ValidationException, s.validate)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user