Skip to content

Commit a5574f7

Browse files
arthurdarcetJorjMcKie
authored andcommitted
fix one test
1 parent 3da8914 commit a5574f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_general.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,28 +134,28 @@ def test_pdfstring():
134134

135135
def test_open_exceptions():
136136
try:
137-
doc = pymupdf.open(filename, filetype="xps")
137+
pymupdf.open(filename, filetype="xps")
138138
except RuntimeError as e:
139139
assert repr(e).startswith("FileDataError")
140140
else:
141141
assert 0
142142

143143
try:
144-
doc = pymupdf.open(filename, filetype="xxx")
144+
pymupdf.open(filename, filetype="xxx")
145145
except Exception as e:
146146
assert repr(e).startswith("ValueError")
147147
else:
148148
assert 0
149149

150150
try:
151-
doc = pymupdf.open("x.y")
151+
pymupdf.open("x.y")
152152
except Exception as e:
153153
assert repr(e).startswith("FileNotFoundError")
154154
else:
155155
assert 0
156156

157157
try:
158-
doc = pymupdf.open("pdf", b"")
158+
pymupdf.open(stream=b"", filetype="pdf")
159159
except RuntimeError as e:
160160
assert repr(e).startswith("EmptyFileError")
161161
else:

0 commit comments

Comments
 (0)