88
99from tmuxp import exc
1010from tmuxp .config_reader import ConfigReader
11- from tmuxp .workspace import config
11+ from tmuxp .workspace import config , validation
1212
1313from ..constants import EXAMPLE_PATH
1414
@@ -175,7 +175,7 @@ def test_in_session_scope(config_fixture: "WorkspaceTestData"):
175175 format = "yaml" , content = config_fixture .shell_command_before_session .before
176176 )
177177
178- config .validate_schema (sconfig )
178+ validation .validate_schema (sconfig )
179179
180180 assert config .expand (sconfig ) == sconfig
181181 assert config .expand (config .trickle (sconfig )) == ConfigReader ._load (
@@ -199,7 +199,7 @@ def test_trickle_window_with_no_pane_workspace():
199199 - window_name: test_no_panes
200200 """
201201 sconfig = ConfigReader ._load (format = "yaml" , content = test_yaml )
202- config .validate_schema (sconfig )
202+ validation .validate_schema (sconfig )
203203
204204 assert config .expand (config .trickle (sconfig ))["windows" ][1 ]["panes" ][0 ] == {
205205 "shell_command" : []
@@ -255,7 +255,7 @@ def test_no_session_name():
255255 sconfig = ConfigReader ._load (format = "yaml" , content = yaml_workspace )
256256
257257 with pytest .raises (exc .WorkspaceError ) as excinfo :
258- config .validate_schema (sconfig )
258+ validation .validate_schema (sconfig )
259259 assert excinfo .matches (r'requires "session_name"' )
260260
261261
@@ -267,7 +267,7 @@ def test_no_windows():
267267 sconfig = ConfigReader ._load (format = "yaml" , content = yaml_workspace )
268268
269269 with pytest .raises (exc .WorkspaceError ) as excinfo :
270- config .validate_schema (sconfig )
270+ validation .validate_schema (sconfig )
271271 assert excinfo .match (r'list of "windows"' )
272272
273273
@@ -289,7 +289,7 @@ def test_no_window_name():
289289 sconfig = ConfigReader ._load (format = "yaml" , content = yaml_workspace )
290290
291291 with pytest .raises (exc .WorkspaceError ) as excinfo :
292- config .validate_schema (sconfig )
292+ validation .validate_schema (sconfig )
293293 assert excinfo .matches ('missing "window_name"' )
294294
295295
@@ -351,5 +351,5 @@ def test_plugins():
351351 sconfig = ConfigReader ._load (format = "yaml" , content = yaml_workspace )
352352
353353 with pytest .raises (exc .WorkspaceError ) as excinfo :
354- config .validate_schema (sconfig )
354+ validation .validate_schema (sconfig )
355355 assert excinfo .matches ("only supports list type" )
0 commit comments