Skip to content

Commit 03692f9

Browse files
committed
handle warnings
1 parent 24e40d0 commit 03692f9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

test/test_bson_binary_vector.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from __future__ import annotations
1616

1717
import binascii
18-
import codecs
1918
import struct
2019
from pathlib import Path
2120
from test import unittest
@@ -111,7 +110,7 @@ def run_test(self):
111110

112111
def create_tests():
113112
for filename in _TEST_PATH.glob("*.json"):
114-
with codecs.open(str(filename), encoding="utf-8") as test_file:
113+
with open(str(filename), encoding="utf-8") as test_file:
115114
test_method = create_test(json_util.loads(test_file.read()))
116115
setattr(TestBSONBinaryVector, "test_" + filename.stem, test_method)
117116

test/test_bson_corpus.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from __future__ import annotations
1717

1818
import binascii
19-
import codecs
2019
import functools
2120
import glob
2221
import json
@@ -227,7 +226,7 @@ def run_test(self):
227226
def create_tests():
228227
for filename in glob.glob(os.path.join(_TEST_PATH, "*.json")):
229228
test_suffix, _ = os.path.splitext(os.path.basename(filename))
230-
with codecs.open(filename, encoding="utf-8") as bson_test_file:
229+
with open(filename, encoding="utf-8") as bson_test_file:
231230
test_method = create_test(json.load(bson_test_file))
232231
setattr(TestBSONCorpus, "test_" + test_suffix, test_method)
233232

0 commit comments

Comments
 (0)