10
10
from tmuxp import config , exc
11
11
12
12
from . import EXAMPLE_PATH
13
- from .fixtures import config as fixtures
14
13
15
14
TMUXP_DIR = pathlib .Path (__file__ ).parent / ".tmuxp"
16
15
@@ -32,6 +31,8 @@ def load_config(path: Union[str, pathlib.Path]) -> str:
32
31
33
32
34
33
def test_export_json (tmp_path : pathlib .Path ):
34
+ from .fixtures import config as fixtures
35
+
35
36
json_config_file = tmp_path / "config.json"
36
37
37
38
configparser = kaptan .Kaptan ()
@@ -47,6 +48,8 @@ def test_export_json(tmp_path: pathlib.Path):
47
48
48
49
49
50
def test_export_yaml (tmp_path : pathlib .Path ):
51
+ from .fixtures import config as fixtures
52
+
50
53
yaml_config_file = tmp_path / "config.yaml"
51
54
52
55
configparser = kaptan .Kaptan ()
@@ -92,17 +95,18 @@ def test_scan_config(tmp_path: pathlib.Path):
92
95
93
96
def test_config_expand1 ():
94
97
"""Expand shell commands from string to list."""
98
+ from .fixtures import config as fixtures
99
+
95
100
test_config = config .expand (fixtures .expand1 .before_config )
96
101
assert test_config == fixtures .expand1 .after_config
97
102
98
103
99
104
def test_config_expand2 ():
100
105
"""Expand shell commands from string to list."""
106
+ from .fixtures import config as fixtures
101
107
102
108
unexpanded_dict = load_yaml (fixtures .expand2 .unexpanded_yaml )
103
-
104
109
expanded_dict = load_yaml (fixtures .expand2 .expanded_yaml )
105
-
106
110
assert config .expand (unexpanded_dict ) == expanded_dict
107
111
108
112
@@ -220,6 +224,8 @@ def test_inheritance_config():
220
224
221
225
def test_shell_command_before ():
222
226
"""Config inheritance for the nested 'start_command'."""
227
+ from .fixtures import config as fixtures
228
+
223
229
test_config = fixtures .shell_command_before .config_unexpanded
224
230
test_config = config .expand (test_config )
225
231
@@ -230,6 +236,8 @@ def test_shell_command_before():
230
236
231
237
232
238
def test_in_session_scope ():
239
+ from .fixtures import config as fixtures
240
+
233
241
sconfig = load_yaml (fixtures .shell_command_before_session .before )
234
242
235
243
config .validate_schema (sconfig )
@@ -241,6 +249,8 @@ def test_in_session_scope():
241
249
242
250
243
251
def test_trickle_relative_start_directory ():
252
+ from .fixtures import config as fixtures
253
+
244
254
test_config = config .trickle (fixtures .trickle .before )
245
255
assert test_config == fixtures .trickle .expected
246
256
@@ -290,6 +300,7 @@ def test_expands_blank_panes():
290
300
'shell_command': ['']
291
301
292
302
"""
303
+ from .fixtures import config as fixtures
293
304
294
305
yaml_config_file = EXAMPLE_PATH / "blank-panes.yaml"
295
306
test_config = load_config (yaml_config_file )
0 commit comments