Begin testing text files

This commit is contained in:
Jamie Hardt
2022-01-11 14:26:38 -08:00
parent a48eccb0d0
commit 15ad328edc
2 changed files with 11 additions and 9 deletions

View File

@@ -14,15 +14,15 @@ class TestBroadcastTimecode(unittest.TestCase):
Setp through every text file in export_cases and make sure it can
be converted into PDF docs without throwing an error
"""
# for path in glob.glob(os.path.dirname(__file__) + "/../export_cases/*.txt"):
# tempdir = tempfile.TemporaryDirectory()
# os.chdir(tempdir.name)
# try:
# commands.convert(path, major_mode='doc')
# except:
# assert False, "Error processing file %s" % path
# finally:
# tempdir.cleanup()
for path in glob.glob(os.path.dirname(__file__) + "/../export_cases/Robin Hood Spotting.txt"):
tempdir = tempfile.TemporaryDirectory()
os.chdir(tempdir.name)
try:
commands.convert(path, major_mode='doc')
except:
assert False, "Error processing file %s" % path
finally:
tempdir.cleanup()