Skip to content

Commit 24617c8

Browse files
committed
Revert "TO BE REVERTED: test leaving out encoding"
This reverts commit 2ccf30c.
1 parent 440a72f commit 24617c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/pymatgen/util/io_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def micro_pyawk(filename, search, results=None, debug=None, postdebug=None):
8181
for entry in search:
8282
entry[0] = re.compile(entry[0])
8383

84-
with zopen(filename, mode="rt") as file:
84+
with zopen(filename, mode="rt", encoding="utf-8") as file:
8585
for line in file:
8686
for entry in search:
8787
match = re.search(entry[0], line)

tests/io/pwmat/test_inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class TestACstrExtractor(PymatgenTest):
4747
def test_extract(self):
4848
filepath = f"{TEST_DIR}/atom.config"
4949
ac_extractor = ACExtractor(file_path=filepath)
50-
with zopen(filepath, mode="rt") as file:
50+
with zopen(filepath, mode="rt", encoding="utf-8") as file:
5151
ac_str_extractor = ACstrExtractor(atom_config_str="".join(file.readlines()))
5252
assert ac_extractor.n_atoms == ac_str_extractor.get_n_atoms()
5353
for idx in range(9):

0 commit comments

Comments
 (0)