3
3
from typing import List
4
4
5
5
# 3rd party
6
+ import dom_toml
6
7
import pytest
7
- import toml
8
8
from coincidence import AdvancedDataRegressionFixture
9
9
from domdf_python_tools .paths import PathPlus
10
10
from shippinglabel .requirements import read_requirements
@@ -66,7 +66,7 @@ def test_seed_intersphinx_mapping(
66
66
)
67
67
def test_seed_intersphinx_mapping_pyproject (tmp_pathplus : PathPlus , contents : str , expects : List [str ], capsys ):
68
68
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 ))
70
70
71
71
assert seed_intersphinx_mapping (* parse_pyproject_toml (tmp_pathplus )) == expects
72
72
err = capsys .readouterr ().err
@@ -81,7 +81,7 @@ def test_seed_intersphinx_mapping_pyproject(tmp_pathplus: PathPlus, contents: st
81
81
)
82
82
def test_seed_intersphinx_mapping_flit (tmp_pathplus : PathPlus , contents : str , expects : List [str ], capsys ):
83
83
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 ))
85
85
86
86
assert seed_intersphinx_mapping (* parse_flit_requirements (tmp_pathplus )) == expects
87
87
err = capsys .readouterr ().err
@@ -109,7 +109,7 @@ def test_sphinx_seed_intersphinx_mapping_mocked(
109
109
"tool" : {"flit" : {"metadata" : {"requires" : contents .splitlines ()}}}
110
110
}
111
111
112
- (tmp_pathplus / "pyproject.toml" ).write_clean (toml .dumps (data ))
112
+ (tmp_pathplus / "pyproject.toml" ).write_clean (dom_toml .dumps (data ))
113
113
(tmp_pathplus / "requirements.txt" ).write_text (contents )
114
114
115
115
app = SimpleNamespace ()
0 commit comments