@@ -175,9 +175,9 @@ def test_find_git_project_root(tmpdir):
175175 "config_files_manager" , defaults .CONFIG_FILES .copy (), indirect = True
176176)
177177def test_set_key (config_files_manager ):
178- _conf = config .read_cfg ()
178+ _conf = config .search_and_read_config_file ()
179179 _conf .set_key ("version" , "2.0.0" )
180- cfg = config .read_cfg ()
180+ cfg = config .search_and_read_config_file ()
181181 assert cfg .settings == _new_settings
182182
183183
@@ -186,12 +186,12 @@ class TestReadCfg:
186186 "config_files_manager" , defaults .CONFIG_FILES .copy (), indirect = True
187187 )
188188 def test_load_conf (_ , config_files_manager ):
189- cfg = config .read_cfg ()
189+ cfg = config .search_and_read_config_file ()
190190 assert cfg .settings == _settings
191191
192192 def test_conf_returns_default_when_no_files (_ , tmpdir ):
193193 with tmpdir .as_cwd ():
194- cfg = config .read_cfg ()
194+ cfg = config .search_and_read_config_file ()
195195 assert cfg .settings == defaults .DEFAULT_SETTINGS
196196
197197 def test_load_empty_pyproject_toml_and_cz_toml_with_config (_ , tmpdir ):
@@ -201,23 +201,23 @@ def test_load_empty_pyproject_toml_and_cz_toml_with_config(_, tmpdir):
201201 p = tmpdir .join (".cz.toml" )
202202 p .write (PYPROJECT )
203203
204- cfg = config .read_cfg ()
204+ cfg = config .search_and_read_config_file ()
205205 assert cfg .settings == _settings
206206
207207 def test_load_pyproject_toml_from_config_argument (_ , tmpdir ):
208208 with tmpdir .as_cwd ():
209209 _not_root_path = tmpdir .mkdir ("not_in_root" ).join ("pyproject.toml" )
210210 _not_root_path .write (PYPROJECT )
211211
212- cfg = config .read_cfg ( filepath = "./not_in_root/pyproject.toml" )
212+ cfg = config .search_and_read_config_file ( "./not_in_root/pyproject.toml" )
213213 assert cfg .settings == _settings
214214
215215 def test_load_cz_json_not_from_config_argument (_ , tmpdir ):
216216 with tmpdir .as_cwd ():
217217 _not_root_path = tmpdir .mkdir ("not_in_root" ).join (".cz.json" )
218218 _not_root_path .write (JSON_STR )
219219
220- cfg = config .read_cfg ( filepath = "./not_in_root/.cz.json" )
220+ cfg = config .search_and_read_config_file ( "./not_in_root/.cz.json" )
221221 json_cfg_by_class = JsonConfig (data = JSON_STR , path = _not_root_path )
222222 assert cfg .settings == json_cfg_by_class .settings
223223
@@ -226,7 +226,7 @@ def test_load_cz_yaml_not_from_config_argument(_, tmpdir):
226226 _not_root_path = tmpdir .mkdir ("not_in_root" ).join (".cz.yaml" )
227227 _not_root_path .write (YAML_STR )
228228
229- cfg = config .read_cfg ( filepath = "./not_in_root/.cz.yaml" )
229+ cfg = config .search_and_read_config_file ( "./not_in_root/.cz.yaml" )
230230 yaml_cfg_by_class = YAMLConfig (data = YAML_STR , path = _not_root_path )
231231 assert cfg .settings == yaml_cfg_by_class ._settings
232232
@@ -236,7 +236,7 @@ def test_load_empty_pyproject_toml_from_config_argument(_, tmpdir):
236236 _not_root_path .write ("" )
237237
238238 with pytest .raises (ConfigFileIsEmpty ):
239- config .read_cfg ( filepath = "./not_in_root/pyproject.toml" )
239+ config .search_and_read_config_file ( "./not_in_root/pyproject.toml" )
240240
241241
242242@pytest .mark .parametrize (
0 commit comments