Skip to content

Commit 67e72d4

Browse files
tests/test_general.py: test_open(): update to match our new behaviour.
We now always use fz_open_document_with_stream_and_dir(), which gives slightly different diagnostics on error.
1 parent 4279d6a commit 67e72d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_general.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,8 +1444,8 @@ def check(filename=None, stream=None, filetype=None, exception=None):
14441444
etype = pymupdf.FileDataError
14451445
etype2 = 'FzErrorBase' if platform.system() == 'OpenBSD' else 'FzErrorUnsupported'
14461446
etext = (
1447-
re.escape(f'mupdf.{etype2}: code=6: cannot find document handler for file: {path}'),
1448-
re.escape(f'pymupdf.FileDataError: Failed to open file {path!r}.'),
1447+
re.escape(f'mupdf.{etype2}: code=6: cannot find document handler for file type: \'pickle\''),
1448+
re.escape(f'pymupdf.FileDataError: Failed to open file {path!r} as type pickle.'),
14491449
)
14501450
check(path, exception=(etype, etext))
14511451

0 commit comments

Comments
 (0)