mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +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_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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user