Added ability to import character files in JSON format from VTTES.

This commit is contained in:
Mark Wolfman
2020-11-08 01:09:55 -06:00
parent 839f684b02
commit 50ac9f8018
11 changed files with 8341 additions and 63 deletions
+8
View File
@@ -1,5 +1,7 @@
import unittest
import os
from pathlib import Path
import subprocess
from dungeonsheets import make_sheets, character
@@ -7,6 +9,10 @@ EG_DIR = os.path.abspath(os.path.join(os.path.split(__file__)[0], '../examples/'
CHARFILE = os.path.join(EG_DIR, 'rogue1.py')
class CharacterFileTestCase(unittest.TestCase):
example_dir = Path(__file__).parent.parent / "examples"
# def test_(self):
# print(self.example_dir)
# subprocess.run(['makesheets', self.example_dir])
def test_load_character_file(self):
charfile = CHARFILE
result = make_sheets.load_character_file(charfile)
@@ -110,3 +116,5 @@ class MarkdownTestCase(unittest.TestCase):
tex = make_sheets.rst_to_latex(md_list)
print(tex)
self.assertIn("\\begin{itemize}", tex)