From 74a3fd79156ffda91fbea0aa7d3bd36029f66fd5 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Sun, 1 Jan 2012 23:28:28 -0500 Subject: [PATCH] new skeleton for world test case --- test/test_world.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/test_world.py diff --git a/test/test_world.py b/test/test_world.py new file mode 100644 index 0000000..319ed7b --- /dev/null +++ b/test/test_world.py @@ -0,0 +1,25 @@ +import unittest + +import os + +from overviewer_core import world + +class ExampleWorldTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + # Make sure that test/data/worlds/example exists + # if it doesn't, then give a little + if not os.path.exists("test/data/worlds/exmaple"): + raise Exception("test data doesn't exist. Maybe you need to init/update your submodule?") + + def test_basic(self): + "Basic test of the world constructor and regionset constructor" + w = world.World("test/data/worlds/exmaple") + + regionsets = w.get_regionsets() + self.assertEquals(len(regionsets), 3) + + + +if __name__ == "__main__": + unittest.main()