mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-25 07:08:29 +02:00
Added spell sheet for casters, but not spells yet.
This commit is contained in:
@@ -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,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))
|
||||
|
||||
Reference in New Issue
Block a user