Skip to content

Commit 5437f2b

Browse files
committed
Clean up tests, add tiled option for blank-panes example.
1 parent c1c77a7 commit 5437f2b

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

tmuxp/config.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ def expand(sconf, cwd=None):
189189
'shell_command': []
190190
}
191191

192-
193-
# if not p:
194-
# p = sconf['panes'][p_index] = {
195-
# 'shell_command': []
196-
# }
197-
198192
if isinstance(p, basestring):
199193

200194
p = sconf['panes'][p_index] = {
@@ -221,10 +215,6 @@ def expand(sconf, cwd=None):
221215
'shell_command': []
222216
}
223217

224-
#elif any(a in p['shell_command'] for a in ['blank', 'pane']):
225-
226-
227-
228218
sconf['panes'] = [expand(pane) for pane in sconf['panes']]
229219

230220
return sconf

tmuxp/testsuite/test_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ class ConfigBlankPanes(TestCase):
738738
'windows': [
739739
{
740740
'window_name': 'Blank pane test',
741+
'layout': 'tiled',
741742
'panes': [
742743
{
743744
'shell_command': [],

tmuxp/testsuite/test_workspacebuilder.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
logger = logging.getLogger(__name__)
1313

1414
current_dir = os.path.abspath(os.path.dirname(__file__))
15-
example_dir = os.path.abspath(os.path.join(current_dir, '..', '..'))
15+
example_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'examples'))
1616

1717

1818
class TwoPaneTest(TmuxTestCase):
@@ -268,7 +268,20 @@ def test_automatic_rename_option(self):
268268

269269

270270
class BlankPaneTest(TmuxTestCase):
271-
""":todo: Verify blank panes of various types build into workspaces"""
271+
272+
""":todo: Verify blank panes of various types build into workspaces."""
273+
274+
yaml_config_file = os.path.join(example_dir, 'blank-panes.yaml')
275+
276+
def test_blank_pane_count(self):
277+
278+
test_config = kaptan.Kaptan().import_config(self.yaml_config_file).get()
279+
test_config = config.expand(test_config)
280+
builder = WorkspaceBuilder(sconf=test_config)
281+
builder.build(session=self.session)
282+
283+
self.assertEqual(self.session, builder.session)
284+
272285

273286
class StartDirectoryTest(TmuxTestCase):
274287
yaml_config = """

0 commit comments

Comments
 (0)