99from usethis ._test import change_cwd
1010
1111
12+ class TestCodespell :
13+ def test_add (self , tmp_path : Path ):
14+ # Act
15+ runner = CliRunner ()
16+ with change_cwd (tmp_path ):
17+ result = runner .invoke (app , ["codespell" ])
18+
19+ # Assert
20+ assert result .exit_code == 0 , result .output
21+
22+
1223class TestDeptry :
1324 @pytest .mark .usefixtures ("_vary_network_conn" )
1425 def test_cli (self , uv_init_dir : Path ):
@@ -31,6 +42,26 @@ def test_cli_not_frozen(self, uv_init_dir: Path):
3142 assert (uv_init_dir / ".venv" ).exists ()
3243
3344
45+ class TestPyprojectTOML :
46+ def test_add (self , tmp_path : Path ):
47+ # Act
48+ runner = CliRunner ()
49+ with change_cwd (tmp_path ):
50+ result = runner .invoke (app , ["pyproject.toml" ])
51+
52+ # Assert
53+ assert result .exit_code == 0 , result .output
54+
55+ def test_remove (self , tmp_path : Path ):
56+ # Act
57+ runner = CliRunner ()
58+ with change_cwd (tmp_path ):
59+ result = runner .invoke (app , ["pyproject.toml" , "--remove" ])
60+
61+ # Assert
62+ assert result .exit_code == 0 , result .output
63+
64+
3465class TestPreCommit :
3566 @pytest .mark .usefixtures ("_vary_network_conn" )
3667 def test_cli_pass (self , uv_init_repo_dir : Path ):
@@ -92,17 +123,6 @@ def test_add(self, tmp_path: Path):
92123 assert result .exit_code == 0 , result .output
93124
94125
95- class TestCodespell :
96- def test_add (self , tmp_path : Path ):
97- # Act
98- runner = CliRunner ()
99- with change_cwd (tmp_path ):
100- result = runner .invoke (app , ["codespell" ])
101-
102- # Assert
103- assert result .exit_code == 0 , result .output
104-
105-
106126@pytest .mark .benchmark
107127def test_several_tools_add_and_remove (tmp_path : Path ):
108128 runner = CliRunner ()
0 commit comments