diff --git a/stages/test/test_containers_storage_conf.py b/stages/test/test_containers_storage_conf.py index 09e6e415..84184ef4 100644 --- a/stages/test/test_containers_storage_conf.py +++ b/stages/test/test_containers_storage_conf.py @@ -3,7 +3,11 @@ import os.path import pytest -import pytoml + +try: + import toml +except ModuleNotFoundError: + import pytoml as toml import osbuild.meta from osbuild.testutil import assert_dict_has @@ -45,8 +49,8 @@ def test_containers_storage_conf_integration(tmp_path, test_filename, test_stora assert os.path.exists(confpath) conf = None - with open(confpath, 'rb') as f: - conf = pytoml.load(f) + with open(confpath, 'r', encoding="utf-8") as f: + conf = toml.load(f) assert conf is not None diff --git a/tox.ini b/tox.ini index 475577b1..756c9d75 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ deps = mako iniparse pyyaml - pytoml + toml pykickstart # required by pykickstart but not pulled in automatically :/ requests