Skip to content

Commit 30fb3a5

Browse files
committed
test: 🐛 Update test_converter.py to use tomli instead of toml for exporting data
1 parent 7e40484 commit 30fb3a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spectrafit/plugins/test/test_converter.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import numpy as np
1414
import pandas as pd
1515
import pytest
16-
import toml
1716
import tomli
1817
import tomli_w
1918
import yaml
@@ -855,8 +854,8 @@ def test_save(
855854
assert np.allclose(data_json[keys[0]], data[keys[0]])
856855

857856
if export_format in {"toml", "lock"}:
858-
with open(fname.parent / f"{fname.stem}.{export_format}") as f:
859-
data_toml = toml.load(f)
857+
with open(fname.parent / f"{fname.stem}.{export_format}", "rb") as f:
858+
data_toml = tomli.load(f)
860859
assert isinstance(data_toml, dict)
861860
assert np.allclose(data_toml[keys[0]], data[keys[0]])
862861

0 commit comments

Comments
 (0)