15 lines
384 B
Python
15 lines
384 B
Python
import unittest
|
|
|
|
from dungeonbattle.interfaces import Map
|
|
|
|
|
|
class TestInterfaces(unittest.TestCase):
|
|
def test_map(self) -> None:
|
|
"""
|
|
Create a map and check that it is well parsed.
|
|
"""
|
|
m = Map.load_from_string(".#\n#.\n")
|
|
self.assertEqual(m.width, 2)
|
|
self.assertEqual(m.height, 2)
|
|
self.assertEqual(m.draw_string(), ".#\n#.")
|