Use tomli_w instead of toml

This commit is contained in:
joncrall
2022-06-27 16:23:02 -04:00
parent 22ba00bb46
commit 12a3fa2d3e
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ extras = {
"pytest-timeout",
"pytest-xdist",
"build",
"toml",
"toml_w",
],
"bin": [
"click",
+6 -5
View File
@@ -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))