|  | 
| 23 | 23 | from _pytest.config.argparsing import get_ini_default_for_type | 
| 24 | 24 | from _pytest.config.argparsing import Parser | 
| 25 | 25 | from _pytest.config.exceptions import UsageError | 
|  | 26 | +from _pytest.config.findpaths import ConfigValue | 
| 26 | 27 | from _pytest.config.findpaths import determine_setup | 
| 27 | 28 | from _pytest.config.findpaths import get_common_ancestor | 
| 28 |  | -from _pytest.config.findpaths import IniValue | 
| 29 | 29 | from _pytest.config.findpaths import locate_config | 
| 30 | 30 | from _pytest.monkeypatch import MonkeyPatch | 
| 31 | 31 | from _pytest.pathlib import absolutepath | 
| @@ -58,9 +58,9 @@ def test_getcfg_and_config( | 
| 58 | 58 |             encoding="utf-8", | 
| 59 | 59 |         ) | 
| 60 | 60 |         _, _, cfg, _ = locate_config(Path.cwd(), [sub]) | 
| 61 |  | -        assert cfg["name"] == IniValue("value", "file") | 
|  | 61 | +        assert cfg["name"] == ConfigValue("value", origin="file") | 
| 62 | 62 |         config = pytester.parseconfigure(str(sub)) | 
| 63 |  | -        assert config.inicfg["name"] == IniValue("value", "file") | 
|  | 63 | +        assert config.inicfg["name"] == ConfigValue("value", origin="file") | 
| 64 | 64 | 
 | 
| 65 | 65 |     def test_setupcfg_uses_toolpytest_with_pytest(self, pytester: Pytester) -> None: | 
| 66 | 66 |         p1 = pytester.makepyfile("def test(): pass") | 
| @@ -1314,7 +1314,7 @@ def test_inifilename(self, tmp_path: Path) -> None: | 
| 1314 | 1314 | 
 | 
| 1315 | 1315 |         # this indicates this is the file used for getting configuration values | 
| 1316 | 1316 |         assert config.inipath == inipath | 
| 1317 |  | -        assert config.inicfg.get("name") == IniValue("value", "file") | 
|  | 1317 | +        assert config.inicfg.get("name") == ConfigValue("value", origin="file") | 
| 1318 | 1318 |         assert config.inicfg.get("should_not_be_set") is None | 
| 1319 | 1319 | 
 | 
| 1320 | 1320 | 
 | 
| @@ -1808,7 +1808,7 @@ def test_with_ini(self, tmp_path: Path, name: str, contents: str) -> None: | 
| 1808 | 1808 |         ) | 
| 1809 | 1809 |         assert rootpath == tmp_path | 
| 1810 | 1810 |         assert parsed_inipath == inipath | 
| 1811 |  | -        assert ini_config["x"] == IniValue("10", "file") | 
|  | 1811 | +        assert ini_config["x"] == ConfigValue("10", origin="file") | 
| 1812 | 1812 | 
 | 
| 1813 | 1813 |     @pytest.mark.parametrize("name", ["setup.cfg", "tox.ini"]) | 
| 1814 | 1814 |     def test_pytestini_overrides_empty_other(self, tmp_path: Path, name: str) -> None: | 
| @@ -1882,7 +1882,7 @@ def test_with_specific_inifile( | 
| 1882 | 1882 |         ) | 
| 1883 | 1883 |         assert rootpath == tmp_path | 
| 1884 | 1884 |         assert inipath == p | 
| 1885 |  | -        assert ini_config["x"] == IniValue("10", "file") | 
|  | 1885 | +        assert ini_config["x"] == ConfigValue("10", origin="file") | 
| 1886 | 1886 | 
 | 
| 1887 | 1887 |     def test_explicit_config_file_sets_rootdir( | 
| 1888 | 1888 |         self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch | 
| @@ -2152,7 +2152,9 @@ def test_addopts_before_initini( | 
| 2152 | 2152 |         monkeypatch.setenv("PYTEST_ADDOPTS", f"-o cache_dir={cache_dir}") | 
| 2153 | 2153 |         config = _config_for_test | 
| 2154 | 2154 |         config._preparse([], addopts=True) | 
| 2155 |  | -        assert config.inicfg.get("cache_dir") == IniValue(cache_dir, "override") | 
|  | 2155 | +        assert config.inicfg.get("cache_dir") == ConfigValue( | 
|  | 2156 | +            cache_dir, origin="override" | 
|  | 2157 | +        ) | 
| 2156 | 2158 | 
 | 
| 2157 | 2159 |     def test_addopts_from_env_not_concatenated( | 
| 2158 | 2160 |         self, monkeypatch: MonkeyPatch, _config_for_test | 
| @@ -2190,7 +2192,9 @@ def test_override_ini_does_not_contain_paths( | 
| 2190 | 2192 |         """Check that -o no longer swallows all options after it (#3103)""" | 
| 2191 | 2193 |         config = _config_for_test | 
| 2192 | 2194 |         config._preparse(["-o", "cache_dir=/cache", "/some/test/path"]) | 
| 2193 |  | -        assert config.inicfg.get("cache_dir") == IniValue("/cache", "override") | 
|  | 2195 | +        assert config.inicfg.get("cache_dir") == ConfigValue( | 
|  | 2196 | +            "/cache", origin="override" | 
|  | 2197 | +        ) | 
| 2194 | 2198 | 
 | 
| 2195 | 2199 |     def test_multiple_override_ini_options(self, pytester: Pytester) -> None: | 
| 2196 | 2200 |         """Ensure a file path following a '-o' option does not generate an error (#3103)""" | 
|  | 
0 commit comments