Skip to content

Commit c1d780c

Browse files
committed
test(conf): add test case for reading setup.cfg with empty config
1 parent 977f98c commit c1d780c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ def test_read_cfg_when_not_in_a_git_project(tmpdir):
142142
config.read_cfg()
143143

144144

145+
class TestInilConfig:
146+
def test_read_setup_cfg_without_commitizen_config(self, tmpdir):
147+
path = tmpdir.mkdir("commitizen").join("setup.cfg")
148+
ini_config = config.IniConfig(data="", path=path)
149+
assert ini_config.is_empty_config
150+
151+
145152
class TestTomlConfig:
146153
def test_init_empty_config_content(self, tmpdir):
147154
path = tmpdir.mkdir("commitizen").join(".cz.toml")

0 commit comments

Comments
 (0)