Create attractive VASL scenarios, with loads of useful information embedded to assist with game play. https://vasl-templates.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
vasl-templates/vasl_templates/tools/tests/test_make_chapter_h_placeho...

27 lines
972 B

"""Test generating the Chapter H placeholder files."""
import os
from zipfile import ZipFile
from vasl_templates.tools.make_chapter_h_placeholders import make_chapter_h_placeholders
from vasl_templates.webapp.utils import TempFile
# ---------------------------------------------------------------------
def test_make_chapter_h_placeholders():
"""Test generating the Chapter H placeholder files."""
with TempFile() as temp_file:
# generate the Chapter H placeholder files
make_chapter_h_placeholders( temp_file.name )
# get the expected results
fname = os.path.join( os.path.split(__file__)[0], "fixtures/chapter-h-placeholders.txt" )
with open( fname, "r", encoding="utf-8" ) as fp:
expected = [ line.strip() for line in fp ]
# check the results
with ZipFile( temp_file.name, "r" ) as zip_file:
zip_fnames = sorted( zip_file.namelist() )
assert zip_fnames == expected