Skip to content

Commit cd95285

Browse files
committed
test: extract fixtures to shorten tests
1 parent c176f7c commit cd95285

10 files changed

+257
-369
lines changed

tests/commands/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
from commitizen.config.json_config import JsonConfig
99

1010

11-
@pytest.fixture()
11+
@pytest.fixture
1212
def config():
1313
_config = BaseConfig()
1414
_config.settings.update({"name": defaults.DEFAULT_SETTINGS["name"]})
1515
return _config
1616

1717

18-
@pytest.fixture()
18+
@pytest.fixture
1919
def config_customize():
2020
json_string = r"""{
2121
"commitizen": {
@@ -45,16 +45,16 @@ def config_customize():
4545
return _config
4646

4747

48-
@pytest.fixture()
48+
@pytest.fixture
4949
def changelog_path() -> str:
5050
return os.path.join(os.getcwd(), "CHANGELOG.md")
5151

5252

53-
@pytest.fixture()
53+
@pytest.fixture
5454
def config_path() -> str:
5555
return os.path.join(os.getcwd(), "pyproject.toml")
5656

5757

58-
@pytest.fixture()
58+
@pytest.fixture
5959
def success_mock(mocker: MockerFixture):
6060
return mocker.patch("commitizen.out.success")

0 commit comments

Comments
 (0)