0
This repository has been archived on 2025-04-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Minecraft-Overviewer/test/test_world.py
2012-01-01 23:28:28 -05:00

26 lines
717 B
Python

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