1313logger = logging .getLogger (__name__ )
1414TMUXP_DIR = os .path .join (os .path .dirname (__file__ ), '.tmuxp' )
1515current_dir = os .path .abspath (os .path .dirname (__file__ ))
16- example_dir = os .path .abspath (os .path .join (current_dir , '..' , '..' , 'examples' ))
16+ example_dir = os .path .abspath (os .path .join (
17+ current_dir , '..' , '..' , 'examples' ))
1718
1819
1920sampleconfigdict = {
@@ -139,12 +140,17 @@ class ExpandTest(TestCase):
139140 'session_name' : 'sampleconfig' ,
140141 'start_directory' : '~' ,
141142 'windows' : [{
142- 'shell_command' : 'top' ,
143143 'window_name' : 'editor' ,
144144 'panes' : [
145+ {
146+ 'shell_command' : [
147+ 'vim' ,
148+ 'top'
149+ ]
150+ },
145151 {
146152 'shell_command' : ['vim' ],
147- },
153+ },
148154 {
149155 'shell_command' : 'cowsay "hey"'
150156 },
@@ -200,12 +206,15 @@ class ExpandTest(TestCase):
200206 'start_directory' : '~' ,
201207 'windows' : [
202208 {
203- 'shell_command' : ['top' ],
204209 'window_name' : 'editor' ,
205210 'panes' : [
211+ {
212+ 'shell_command' : ['vim' , 'top' ],
213+ },
206214 {
207215 'shell_command' : ['vim' ],
208- }, {
216+ },
217+ {
209218 'shell_command' : ['cowsay "hey"' ]
210219 },
211220 ],
@@ -274,7 +283,7 @@ class InlineTest(TestCase):
274283 'window_name' : 'editor' ,
275284 'panes' : [
276285 {
277- 'start_directory' : '~' , ' shell_command' : ['vim' ],
286+ 'shell_command' : ['vim' ],
278287 }, {
279288 'shell_command' : ['cowsay "hey"' ]
280289 },
@@ -284,8 +293,9 @@ class InlineTest(TestCase):
284293 {
285294 'window_name' : 'logging' ,
286295 'panes' : [
287- {'shell_command' : ['tail -F /var/log/syslog' ],
288- 'start_directory' :'/var/log' }
296+ {
297+ 'shell_command' : ['tail -F /var/log/syslog' ],
298+ }
289299 ]
290300 },
291301 {
@@ -305,35 +315,26 @@ class InlineTest(TestCase):
305315 'shell_command' : 'top' ,
306316 'window_name' : 'editor' ,
307317 'panes' : [
308- {
309- 'start_directory' : '~' ,
310- 'shell_command' : 'vim' ,
311- },
312- {
313- 'shell_command' : 'cowsay "hey"'
314- },
318+ 'vim' ,
319+ 'cowsay "hey"'
315320 ],
316321 'layout' : 'main-verticle'
317322 },
318323 {
319324 'window_name' : 'logging' ,
320325 'panes' : [
321- {
322- 'shell_command' : 'tail -F /var/log/syslog' ,
323- 'start_directory' : '/var/log'
324- }
326+ 'tail -F /var/log/syslog' ,
325327 ]
326328 },
327329 {
328330 'options' : {
329331 'automatic_rename' : True ,
330332 },
331333 'panes' : [
332- {
333- 'shell_command' : 'htop'
334- }
334+ 'htop'
335335 ]
336- }
336+ },
337+
337338 ]
338339 }
339340
@@ -358,7 +359,6 @@ class InheritanceTest(TestCase):
358359 'start_directory' : '~' ,
359360 'panes' : [
360361 {
361- 'start_directory' : '~' ,
362362 'shell_command' : ['vim' ],
363363 },
364364 {
@@ -372,7 +372,6 @@ class InheritanceTest(TestCase):
372372 'panes' : [
373373 {
374374 'shell_command' : ['tail -F /var/log/syslog' ],
375- 'start_directory' :'/var/log'
376375 }
377376 ]
378377 },
@@ -381,7 +380,6 @@ class InheritanceTest(TestCase):
381380 'panes' : [
382381 {
383382 'shell_command' : ['htop' ],
384- 'start_directory' : '/etc/'
385383 }
386384 ]
387385 },
@@ -407,9 +405,9 @@ class InheritanceTest(TestCase):
407405 'start_directory' : '~' ,
408406 'panes' : [
409407 {
410- 'start_directory' : '~' , ' shell_command' : ['vim' ],
408+ 'shell_command' : ['vim' ],
411409 }, {
412- 'shell_command' : ['cowsay "hey"' ], 'start_directory' : '~' ,
410+ 'shell_command' : ['cowsay "hey"' ],
413411 },
414412 ],
415413 'layout' : 'main-verticle'
@@ -419,23 +417,22 @@ class InheritanceTest(TestCase):
419417 'panes' : [
420418 {
421419 'shell_command' : ['tail -F /var/log/syslog' ],
422- 'start_directory' :'/var/log'
423420 }
424421 ]
425422 },
426423 {
427424 'window_name' : 'shufu' ,
428425 'panes' : [
429426 {
430- 'shell_command' : ['htop' ], 'start_directory' : '/etc/'
427+ 'shell_command' : ['htop' ],
431428 }
432429 ]
433430 },
434431 {
435432 'options' : {'automatic_rename' : True , },
436433 'panes' : [
437434 {
438- 'shell_command' : ['htop' ], 'start_directory' : '/'
435+ 'shell_command' : ['htop' ],
439436 }
440437 ]
441438 }
@@ -458,12 +455,13 @@ def test_start_directory(self):
458455 window_start_directory = session_start_directory
459456
460457 for paneconfitem in windowconfitem ['panes' ]:
461- if 'start_directory' in paneconfitem :
462- pane_start_directory = paneconfitem ['start_directory' ]
463- elif window_start_directory :
464- paneconfitem ['start_directory' ] = window_start_directory
465- elif session_start_directory :
466- paneconfitem ['start_directory' ] = session_start_directory
458+ # if 'start_directory' in paneconfitem:
459+ # pane_start_directory = paneconfitem['start_directory']
460+ # elif window_start_directory:
461+ # paneconfitem['start_directory'] = window_start_directory
462+ # elif session_start_directory:
463+ # paneconfitem['start_directory'] = session_start_directory
464+ pass
467465
468466 self .maxDiff = None
469467 self .assertDictEqual (config , self .config_after )
@@ -813,7 +811,8 @@ def test_expands_blank(self):
813811
814812 self .maxDiff = None
815813
816- test_config = kaptan .Kaptan ().import_config (self .yaml_config_file ).get ()
814+ test_config = kaptan .Kaptan ().import_config (
815+ self .yaml_config_file ).get ()
817816
818817 self .assertDictEqual (
819818 config .expand (test_config ),
0 commit comments