Skip to content

Commit 115ce80

Browse files
committed
Use dom_toml rather than the toml module.
1 parent 0c5ee20 commit 115ce80

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/test_requirements_parsers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from typing import List
33

44
# 3rd party
5+
import dom_toml
56
import pytest
6-
import toml
77
from domdf_python_tools.paths import PathPlus
88

99
# this package
@@ -76,7 +76,7 @@ def test_seed_intersphinx_mapping_pyproject(
7676
expects: List[str],
7777
):
7878
data = {"project": {"dependencies": contents.splitlines()}}
79-
(tmp_pathplus / "pyproject.toml").write_clean(toml.dumps(data))
79+
(tmp_pathplus / "pyproject.toml").write_clean(dom_toml.dumps(data))
8080

8181
assert parse_pyproject_toml(tmp_pathplus) == expects
8282

@@ -93,6 +93,6 @@ def test_seed_intersphinx_mapping_flit(
9393
expects: List[str],
9494
):
9595
data = {"tool": {"flit": {"metadata": {"requires": contents.splitlines()}}}}
96-
(tmp_pathplus / "pyproject.toml").write_clean(toml.dumps(data))
96+
(tmp_pathplus / "pyproject.toml").write_clean(dom_toml.dumps(data))
9797

9898
assert parse_flit_requirements(tmp_pathplus) == expects

tests/test_seeding.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from typing import List
44

55
# 3rd party
6+
import dom_toml
67
import pytest
7-
import toml
88
from coincidence import AdvancedDataRegressionFixture
99
from domdf_python_tools.paths import PathPlus
1010
from shippinglabel.requirements import read_requirements
@@ -66,7 +66,7 @@ def test_seed_intersphinx_mapping(
6666
)
6767
def test_seed_intersphinx_mapping_pyproject(tmp_pathplus: PathPlus, contents: str, expects: List[str], capsys):
6868
data = {"project": {"dependencies": contents.splitlines()}}
69-
(tmp_pathplus / "pyproject.toml").write_clean(toml.dumps(data))
69+
(tmp_pathplus / "pyproject.toml").write_clean(dom_toml.dumps(data))
7070

7171
assert seed_intersphinx_mapping(*parse_pyproject_toml(tmp_pathplus)) == expects
7272
err = capsys.readouterr().err
@@ -81,7 +81,7 @@ def test_seed_intersphinx_mapping_pyproject(tmp_pathplus: PathPlus, contents: st
8181
)
8282
def test_seed_intersphinx_mapping_flit(tmp_pathplus: PathPlus, contents: str, expects: List[str], capsys):
8383
data = {"tool": {"flit": {"metadata": {"requires": contents.splitlines()}}}}
84-
(tmp_pathplus / "pyproject.toml").write_clean(toml.dumps(data))
84+
(tmp_pathplus / "pyproject.toml").write_clean(dom_toml.dumps(data))
8585

8686
assert seed_intersphinx_mapping(*parse_flit_requirements(tmp_pathplus)) == expects
8787
err = capsys.readouterr().err
@@ -109,7 +109,7 @@ def test_sphinx_seed_intersphinx_mapping_mocked(
109109
"tool": {"flit": {"metadata": {"requires": contents.splitlines()}}}
110110
}
111111

112-
(tmp_pathplus / "pyproject.toml").write_clean(toml.dumps(data))
112+
(tmp_pathplus / "pyproject.toml").write_clean(dom_toml.dumps(data))
113113
(tmp_pathplus / "requirements.txt").write_text(contents)
114114

115115
app = SimpleNamespace()

0 commit comments

Comments
 (0)