Skip to content

Commit ffa7554

Browse files
committed
clarify reading_from_buffer test
1 parent fe042ae commit ffa7554

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/reader_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,9 @@ def test_reading_from_buffer(self) -> None:
529529
filename = "tests/data/test-data/MaxMind-DB-test-ipv4-24.mmdb"
530530
with open(filename, "rb") as f:
531531
buf = io.BytesIO(f.read())
532-
reader = open_database(buf, MODE_FD)
532+
# we have to use unpatched open_database here because the patched version
533+
# calls open() on our buffer
534+
reader = maxminddb.open_database(buf, MODE_FD)
533535
self._check_ip_v4(reader, filename)
534536
reader.close()
535537

0 commit comments

Comments
 (0)