mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2026-01-02 01:40:49 +00:00
Begin testing text files
This commit is contained in:
@@ -99,6 +99,8 @@ def make_doc_template(page_size, filename, document_title,
|
|||||||
|
|
||||||
|
|
||||||
def time_format(mins, zero_str="-"):
|
def time_format(mins, zero_str="-"):
|
||||||
|
if mins is None:
|
||||||
|
return zero_str
|
||||||
if mins == 0. and zero_str is not None:
|
if mins == 0. and zero_str is not None:
|
||||||
return zero_str
|
return zero_str
|
||||||
elif mins < 60.:
|
elif mins < 60.:
|
||||||
|
|||||||
@@ -14,15 +14,15 @@ class TestBroadcastTimecode(unittest.TestCase):
|
|||||||
Setp through every text file in export_cases and make sure it can
|
Setp through every text file in export_cases and make sure it can
|
||||||
be converted into PDF docs without throwing an error
|
be converted into PDF docs without throwing an error
|
||||||
"""
|
"""
|
||||||
# for path in glob.glob(os.path.dirname(__file__) + "/../export_cases/*.txt"):
|
for path in glob.glob(os.path.dirname(__file__) + "/../export_cases/Robin Hood Spotting.txt"):
|
||||||
# tempdir = tempfile.TemporaryDirectory()
|
tempdir = tempfile.TemporaryDirectory()
|
||||||
# os.chdir(tempdir.name)
|
os.chdir(tempdir.name)
|
||||||
# try:
|
try:
|
||||||
# commands.convert(path, major_mode='doc')
|
commands.convert(path, major_mode='doc')
|
||||||
# except:
|
except:
|
||||||
# assert False, "Error processing file %s" % path
|
assert False, "Error processing file %s" % path
|
||||||
# finally:
|
finally:
|
||||||
# tempdir.cleanup()
|
tempdir.cleanup()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user