mirror of
https://github.com/Oreolek/gamebookformat.git
synced 2024-07-01 06:05:11 +03:00
3a1f8821c1
Ought to add some more soon.
29 lines
595 B
Python
Executable file
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()
|