From 12a3fa2d3e6e232b3114679730436df7d7add175 Mon Sep 17 00:00:00 2001 From: joncrall Date: Mon, 27 Jun 2022 16:23:02 -0400 Subject: [PATCH] Use tomli_w instead of toml --- setup.py | 2 +- unit_test/oci_container_test.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index ad32d3f3..2ceaa359 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ extras = { "pytest-timeout", "pytest-xdist", "build", - "toml", + "toml_w", ], "bin": [ "click", diff --git a/unit_test/oci_container_test.py b/unit_test/oci_container_test.py index baee3c3d..838c72bd 100644 --- a/unit_test/oci_container_test.py +++ b/unit_test/oci_container_test.py @@ -7,7 +7,8 @@ import textwrap from pathlib import Path, PurePath, PurePosixPath import pytest -import toml + +import tomli_w from cibuildwheel.environment import EnvironmentAssignmentBash from cibuildwheel.oci_container import OCIContainer @@ -269,11 +270,11 @@ def test_podman_vfs(tmp_path: Path, monkeypatch, request): vfs_containers_conf_fpath = vfs_path / "temp_vfs_containers.conf" vfs_containers_storage_conf_fpath = vfs_path / "temp_vfs_containers_storage.conf" - with open(vfs_containers_conf_fpath, "w") as file: - toml.dump(vfs_containers_conf_data, file) + with open(vfs_containers_conf_fpath, "wb") as file: + tomli_w.dump(vfs_containers_conf_data, file) - with open(vfs_containers_storage_conf_fpath, "w") as file: - toml.dump(vfs_containers_storage_conf_data, file) + with open(vfs_containers_storage_conf_fpath, "wb") as file: + tomli_w.dump(vfs_containers_storage_conf_data, file) monkeypatch.setenv("CONTAINERS_CONF", str(vfs_containers_conf_fpath)) monkeypatch.setenv("CONTAINERS_STORAGE_CONF", str(vfs_containers_storage_conf_fpath))