File tree 5 files changed +28
-31
lines changed 5 files changed +28
-31
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
2
import sys
3
- from commitizen import cli
3
+ from commitizen import cli , commands
4
4
5
5
from pytest_mock import MockerFixture
6
6
7
7
8
+ def test_example (config , mocker : MockerFixture ):
9
+ write_mock = mocker .patch ("commitizen.out.write" )
10
+ commands .Example (config )()
11
+ write_mock .assert_called_once ()
12
+
13
+
8
14
def test_example_command_shows_description_when_use_help_option (
9
15
mocker : MockerFixture , capsys
10
16
):
Original file line number Diff line number Diff line change 1
1
import pytest
2
2
import sys
3
- from commitizen import cli
3
+ from commitizen import cli , commands
4
4
5
5
from pytest_mock import MockerFixture
6
6
7
7
8
+ def test_info (config , mocker : MockerFixture ):
9
+ write_mock = mocker .patch ("commitizen.out.write" )
10
+ commands .Info (config )()
11
+ write_mock .assert_called_once ()
12
+
13
+
8
14
def test_info_command_shows_description_when_use_help_option (
9
15
mocker : MockerFixture , capsys
10
16
):
Original file line number Diff line number Diff line change 1
1
import pytest
2
2
import sys
3
- from commitizen import cli
3
+ from commitizen import cli , commands
4
4
5
5
from pytest_mock import MockerFixture
6
6
7
7
8
+ def test_list_cz (config , mocker : MockerFixture ):
9
+ write_mock = mocker .patch ("commitizen.out.write" )
10
+ commands .ListCz (config )()
11
+ write_mock .assert_called_once ()
12
+
13
+
8
14
def test_ls_command_shows_description_when_use_help_option (
9
15
mocker : MockerFixture , capsys
10
16
):
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import pytest
2
2
import sys
3
- from commitizen import cli
3
+ from commitizen import cli , commands
4
4
5
5
from pytest_mock import MockerFixture
6
6
7
7
8
+ def test_schema (config , mocker : MockerFixture ):
9
+ write_mock = mocker .patch ("commitizen.out.write" )
10
+ commands .Schema (config )()
11
+ write_mock .assert_called_once ()
12
+
13
+
8
14
def test_schema_command_shows_description_when_use_help_option (
9
15
mocker : MockerFixture , capsys
10
16
):
You can’t perform that action at this time.
0 commit comments