mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Test some debug functions. No asserts, just check they run ok.
This commit is contained in:
parent
949e87e55d
commit
6ff77414b3
|
@ -58,6 +58,11 @@ for file in files:
|
||||||
))
|
))
|
||||||
result = out.read()
|
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
|
# Extract any ignore patterns
|
||||||
ignore_pats = ignore_re.findall(result)
|
ignore_pats = ignore_re.findall(result)
|
||||||
result = ignore_re.sub('', result)
|
result = ignore_re.sub('', result)
|
||||||
|
|
|
@ -135,4 +135,26 @@ def test_listdir():
|
||||||
ole.close()
|
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
|
# End of file
|
||||||
|
|
Loading…
Reference in New Issue
Block a user