Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ build
coverage
pytest
pytest-rerunfailures
toml
# Some tests need to write TOML, but tomli and tomllib are read-only, and toml package is unmaintained
tomli-w
wheel
4 changes: 2 additions & 2 deletions tests/lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from secrets import token_hex
from typing import Any, Callable

import toml
import tomli_w

log = logging.getLogger(__name__)
root = Path(__file__).parent.parent
Expand Down Expand Up @@ -217,7 +217,7 @@ def create_pyproject_toml(
if config != NotImplemented:
cfg["tool"] = {"setuptools-git-versioning": config}

return create_file(cwd, "pyproject.toml", toml.dumps(cfg), commit=commit, **kwargs)
return create_file(cwd, "pyproject.toml", tomli_w.dumps(cfg), commit=commit, **kwargs)


def create_setup_py(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_integration/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import textwrap

import pytest
import toml
import tomli_w

from tests.lib.util import (
create_file,
Expand Down Expand Up @@ -66,7 +66,7 @@ def test_config_not_used(repo):
create_file(
repo,
"pyproject.toml",
toml.dumps(cfg),
tomli_w.dumps(cfg),
)

assert get_version(repo, isolated=False) == "0.0.0"
Expand Down
Loading