diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index fbe7c0db6b..b79c73e7d7 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -348,11 +348,12 @@ def test_bump_when_version_inconsistent_in_version_files( def test_bump_major_version_zero_when_major_is_not_zero(mocker, tmp_commitizen_project): tmp_version_file = tmp_commitizen_project.join("__version__.py") tmp_version_file.write("1.0.0") + tmp_version_file_string = str(tmp_version_file).replace("\\", "/") tmp_commitizen_cfg_file = tmp_commitizen_project.join("pyproject.toml") tmp_commitizen_cfg_file.write( f"[tool.commitizen]\n" 'version="1.0.0"\n' - f'version_files = ["{str(tmp_version_file)}"]' + f'version_files = ["{str(tmp_version_file_string)}"]' ) tmp_changelog_file = tmp_commitizen_project.join("CHANGELOG.md") tmp_changelog_file.write("## v1.0.0") diff --git a/tests/commands/test_init_command.py b/tests/commands/test_init_command.py index 6fa8d5008a..4b59665b8e 100644 --- a/tests/commands/test_init_command.py +++ b/tests/commands/test_init_command.py @@ -25,7 +25,6 @@ def ask(self): } expected_config = ( - "[tool]\n" "[tool.commitizen]\n" 'name = "cz_conventional_commits"\n' 'version = "0.0.1"\n' diff --git a/tests/test_conf.py b/tests/test_conf.py index c4020d640b..746cde2401 100644 --- a/tests/test_conf.py +++ b/tests/test_conf.py @@ -138,7 +138,7 @@ def test_init_empty_config_content(self, tmpdir): toml_config.init_empty_config_content() with open(path, "r") as toml_file: - assert toml_file.read() == "[tool]\n[tool.commitizen]\n" + assert toml_file.read() == "[tool.commitizen]\n" def test_init_empty_config_content_with_existing_content(self, tmpdir): existing_content = "[tool.black]\n" "line-length = 88\n"