0

new skeleton for world test case

This commit is contained in:
Andrew Chin
2012-01-01 23:28:28 -05:00
parent 4a12d3dadc
commit 74a3fd7915

25
test/test_world.py Normal file
View File

@@ -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()