1
0
Fork 0
mirror of https://github.com/Oreolek/gamebookformat.git synced 2024-07-01 06:05:11 +03:00
gamebookformat/test_sections.py
Pelle Nilsson 3a1f8821c1 Cleaned up old automatic tests.
Ought to add some more soon.
2013-06-04 22:40:09 +02:00

29 lines
595 B
Python
Executable file

#!/usr/bin/env python2
import unittest
from unittest import TestCase
import sections
class TestSection(TestCase):
def setUp(self):
pass
def test_create(self):
sec = sections.Section("nnn", "text")
self.assertEqual(sec.name, "nnn")
self.assertEqual(sec.text, "text")
class TestBook(TestCase):
def setUp(self):
pass
def test_create(self):
b = sections.Book()
self.assertEqual(b.sections, [])
self.assertEqual(b.nr_sections, {})
self.assertEqual(b.max, 0)
if __name__ == '__main__':
unittest.main()