Added spell sheet for casters, but not spells yet.

This commit is contained in:
Mark Wolfman
2018-03-28 23:56:11 -05:00
parent cafde3465d
commit 8a53b7c2be
9 changed files with 231 additions and 28 deletions
+13
View File
@@ -112,3 +112,16 @@ class TestCharacter(TestCase):
self.assertEqual(char.proficiency_bonus, 6)
char.level = 20
self.assertEqual(char.proficiency_bonus, 6)
def test_spell_slots(self):
char = Wizard()
# Wizard level 1
char.level = 1
self.assertEqual(char.spell_slots(spell_level=0), 3)
self.assertEqual(char.spell_slots(spell_level=1), 2)
self.assertEqual(char.spell_slots(spell_level=2), 0)
# Wizard level 2
char.level = 2
self.assertEqual(char.spell_slots(spell_level=0), 3)
self.assertEqual(char.spell_slots(spell_level=1), 3)
self.assertEqual(char.spell_slots(spell_level=2), 0)
-11
View File
@@ -11,14 +11,3 @@ class CharacterFileTestCase(unittest.TestCase):
charfile = CHARFILE
result = make_sheets.load_character_file(charfile)
self.assertEqual(result['strength'], 8)
class FDFTestCase(unittest.TestCase):
def tearDown(self):
if os.path.exists('temp.fdf'):
os.remove('temp.fdf')
def test_create_fdf(self):
fdfname = 'temp.fdf'
char = character.Character()
make_sheets.create_fdf(char, fdfname=fdfname)
self.assertTrue(os.path.exists(fdfname))