Test some debug functions. No asserts, just check they run ok.

This commit is contained in:
hugovk 2014-04-14 00:05:31 +03:00
parent 949e87e55d
commit 6ff77414b3
2 changed files with 27 additions and 0 deletions

View File

@ -58,6 +58,11 @@ for file in files:
))
result = out.read()
result_lines = result.splitlines()
if len(result_lines):
if result_lines[0] == "ignore_all_except_last_line":
result = result_lines[-1]
# Extract any ignore patterns
ignore_pats = ignore_re.findall(result)
result = ignore_re.sub('', result)

View File

@ -135,4 +135,26 @@ def test_listdir():
ole.close()
def test_debug():
# Arrange
print("ignore_all_except_last_line")
ole_file = "Tests/images/test-ole-file.doc"
ole = OleFileIO.OleFileIO(ole_file)
meta = ole.get_metadata()
# Act
OleFileIO.set_debug_mode(True)
ole.dumpdirectory()
meta.dump()
OleFileIO.set_debug_mode(False)
ole.dumpdirectory()
meta.dump()
# Assert
# No assert, just check they run ok
print("ok")
ole.close()
# End of file