mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-18 20:23:27 +02:00
moves template pdf functions to new file
This commit is contained in:
@@ -3,6 +3,8 @@ import os
|
||||
from pathlib import Path
|
||||
|
||||
from dungeonsheets import make_sheets, character
|
||||
from dungeonsheets.fill_pdf_template import create_character_pdf_template, create_spells_pdf_template
|
||||
|
||||
|
||||
EG_DIR = os.path.abspath(os.path.join(os.path.split(__file__)[0], "../examples/"))
|
||||
CHARFILE = os.path.join(EG_DIR, "rogue1.py")
|
||||
@@ -17,7 +19,7 @@ class CharacterFileTestCase(unittest.TestCase):
|
||||
self.assertEqual(result["strength"], 10)
|
||||
|
||||
|
||||
class PdfOutputTeestCase(unittest.TestCase):
|
||||
class PdfOutputTestCase(unittest.TestCase):
|
||||
basename = "clara"
|
||||
|
||||
def tearDown(self):
|
||||
@@ -32,5 +34,5 @@ class PdfOutputTeestCase(unittest.TestCase):
|
||||
# self.assertFalse(os.path.exists(pdf_name), f'{pdf_name} already exists.')
|
||||
char = character.Character(name="Clara")
|
||||
char.saving_throw_proficiencies = ["strength"]
|
||||
make_sheets.create_character_pdf(character=char, basename=self.basename)
|
||||
make_sheets.create_character_pdf_template(character=char, basename=self.basename)
|
||||
self.assertTrue(os.path.exists(pdf_name), f"{pdf_name} not created.")
|
||||
|
||||
Reference in New Issue
Block a user