1+ """CLI tests for tmuxp's core shell functionality."""
12import argparse
23import contextlib
34import pathlib
@@ -41,6 +42,7 @@ def test_help(
4142 monkeypatch : pytest .MonkeyPatch ,
4243 capsys : pytest .CaptureFixture [str ],
4344) -> None :
45+ """Test tmuxp --help / -h."""
4446 # In scrunched terminals, prevent width causing differentiation in result.out.
4547 monkeypatch .setenv ("COLUMNS" , "100" )
4648 monkeypatch .setenv ("LINES" , "100" )
@@ -54,8 +56,10 @@ def test_help(
5456
5557
5658def test_resolve_behavior (
57- tmp_path : pathlib .Path , monkeypatch : pytest .MonkeyPatch
59+ tmp_path : pathlib .Path ,
60+ monkeypatch : pytest .MonkeyPatch ,
5861) -> None :
62+ """Test resolution of file paths."""
5963 expect = tmp_path
6064 monkeypatch .chdir (tmp_path )
6165 assert pathlib .Path ("../" ).resolve () == expect .parent
@@ -64,7 +68,10 @@ def test_resolve_behavior(
6468 assert pathlib .Path (expect ).resolve () == expect
6569
6670
67- def test_get_tmuxinator_dir (monkeypatch : pytest .MonkeyPatch ) -> None :
71+ def test_get_tmuxinator_dir (
72+ monkeypatch : pytest .MonkeyPatch ,
73+ ) -> None :
74+ """Test get_tmuxinator_dir() helper function."""
6875 assert get_tmuxinator_dir () == pathlib .Path ("~/.tmuxinator" ).expanduser ()
6976
7077 monkeypatch .setenv ("HOME" , "/moo" )
@@ -73,7 +80,10 @@ def test_get_tmuxinator_dir(monkeypatch: pytest.MonkeyPatch) -> None:
7380 assert get_tmuxinator_dir () == pathlib .Path ("~/.tmuxinator/" ).expanduser ()
7481
7582
76- def test_get_teamocil_dir (monkeypatch : pytest .MonkeyPatch ) -> None :
83+ def test_get_teamocil_dir (
84+ monkeypatch : pytest .MonkeyPatch ,
85+ ) -> None :
86+ """Test get_teamocil_dir() helper function."""
7787 assert get_teamocil_dir () == pathlib .Path ("~/.teamocil/" ).expanduser ()
7888
7989 monkeypatch .setenv ("HOME" , "/moo" )
@@ -82,11 +92,12 @@ def test_get_teamocil_dir(monkeypatch: pytest.MonkeyPatch) -> None:
8292 assert get_teamocil_dir () == pathlib .Path ("~/.teamocil/" ).expanduser ()
8393
8494
85- def test_pass_config_dir_ClickPath (
95+ def test_pass_config_dir_argparse (
8696 tmp_path : pathlib .Path ,
8797 monkeypatch : pytest .MonkeyPatch ,
8898 capsys : pytest .CaptureFixture [str ],
8999) -> None :
100+ """Test workspace configurations can be detected via directory."""
90101 configdir = tmp_path / "myconfigdir"
91102 configdir .mkdir ()
92103 user_config_name = "myconfig"
@@ -118,8 +129,10 @@ def check_cmd(config_arg: str) -> "_pytest.capture.CaptureResult[str]":
118129
119130
120131def test_reattach_plugins (
121- monkeypatch_plugin_test_packages : None , server : "Server"
132+ monkeypatch_plugin_test_packages : None ,
133+ server : "Server" ,
122134) -> None :
135+ """Test reattach plugin hook."""
123136 config_plugins = test_utils .read_workspace_file ("workspace/builder/plugin_r.yaml" )
124137
125138 session_configig = ConfigReader ._load (format = "yaml" , content = config_plugins )
0 commit comments