@@ -58,9 +58,9 @@ def test_getcfg_and_config(
5858 encoding = "utf-8" ,
5959 )
6060 _ , _ , cfg , _ = locate_config (Path .cwd (), [sub ])
61- assert cfg ["name" ] == ConfigValue ("value" , "file" )
61+ assert cfg ["name" ] == ConfigValue ("value" , origin = "file" )
6262 config = pytester .parseconfigure (str (sub ))
63- assert config .inicfg ["name" ] == ConfigValue ("value" , "file" )
63+ assert config .inicfg ["name" ] == ConfigValue ("value" , origin = "file" )
6464
6565 def test_setupcfg_uses_toolpytest_with_pytest (self , pytester : Pytester ) -> None :
6666 p1 = pytester .makepyfile ("def test(): pass" )
@@ -1314,7 +1314,7 @@ def test_inifilename(self, tmp_path: Path) -> None:
13141314
13151315 # this indicates this is the file used for getting configuration values
13161316 assert config .inipath == inipath
1317- assert config .inicfg .get ("name" ) == ConfigValue ("value" , "file" )
1317+ assert config .inicfg .get ("name" ) == ConfigValue ("value" , origin = "file" )
13181318 assert config .inicfg .get ("should_not_be_set" ) is None
13191319
13201320
@@ -1808,7 +1808,7 @@ def test_with_ini(self, tmp_path: Path, name: str, contents: str) -> None:
18081808 )
18091809 assert rootpath == tmp_path
18101810 assert parsed_inipath == inipath
1811- assert ini_config ["x" ] == ConfigValue ("10" , "file" )
1811+ assert ini_config ["x" ] == ConfigValue ("10" , origin = "file" )
18121812
18131813 @pytest .mark .parametrize ("name" , ["setup.cfg" , "tox.ini" ])
18141814 def test_pytestini_overrides_empty_other (self , tmp_path : Path , name : str ) -> None :
@@ -1882,7 +1882,7 @@ def test_with_specific_inifile(
18821882 )
18831883 assert rootpath == tmp_path
18841884 assert inipath == p
1885- assert ini_config ["x" ] == ConfigValue ("10" , "file" )
1885+ assert ini_config ["x" ] == ConfigValue ("10" , origin = "file" )
18861886
18871887 def test_explicit_config_file_sets_rootdir (
18881888 self , tmp_path : Path , monkeypatch : pytest .MonkeyPatch
@@ -2152,7 +2152,9 @@ def test_addopts_before_initini(
21522152 monkeypatch .setenv ("PYTEST_ADDOPTS" , f"-o cache_dir={ cache_dir } " )
21532153 config = _config_for_test
21542154 config ._preparse ([], addopts = True )
2155- assert config .inicfg .get ("cache_dir" ) == ConfigValue (cache_dir , "override" )
2155+ assert config .inicfg .get ("cache_dir" ) == ConfigValue (
2156+ cache_dir , origin = "override"
2157+ )
21562158
21572159 def test_addopts_from_env_not_concatenated (
21582160 self , monkeypatch : MonkeyPatch , _config_for_test
@@ -2190,7 +2192,9 @@ def test_override_ini_does_not_contain_paths(
21902192 """Check that -o no longer swallows all options after it (#3103)"""
21912193 config = _config_for_test
21922194 config ._preparse (["-o" , "cache_dir=/cache" , "/some/test/path" ])
2193- assert config .inicfg .get ("cache_dir" ) == ConfigValue ("/cache" , "override" )
2195+ assert config .inicfg .get ("cache_dir" ) == ConfigValue (
2196+ "/cache" , origin = "override"
2197+ )
21942198
21952199 def test_multiple_override_ini_options (self , pytester : Pytester ) -> None :
21962200 """Ensure a file path following a '-o' option does not generate an error (#3103)"""
0 commit comments