Skip to content

Commit 3930bd8

Browse files
committed
PEP 257
1 parent e337583 commit 3930bd8

File tree

2 files changed

+36
-31
lines changed

2 files changed

+36
-31
lines changed

tmuxp/testsuite/test_config.py

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ def test_scan_config(self):
115115

116116
if os.path.exists(self.tmp_dir):
117117
for r, d, f in os.walk(self.tmp_dir):
118-
for filela in (x for x in f if x.endswith(('.json', '.ini', 'yaml'))):
118+
for filela in (
119+
x for x in f if x.endswith(('.json', '.ini', 'yaml'))
120+
):
119121
configs.append(os.path.join(
120122
self.tmp_dir, filela))
121123

@@ -144,23 +146,25 @@ class ExpandTest(TestCase):
144146
before_config = {
145147
'session_name': 'sampleconfig',
146148
'start_directory': '~',
147-
'windows': [{
148-
'window_name': 'editor',
149-
'panes': [
150-
{
151-
'shell_command': [
152-
'vim',
153-
'top'
154-
]
155-
},
156-
{
157-
'shell_command': ['vim'],
158-
},
159-
{
160-
'shell_command': 'cowsay "hey"'
161-
},
162-
],
163-
'layout': 'main-verticle'},
149+
'windows': [
150+
{
151+
'window_name': 'editor',
152+
'panes': [
153+
{
154+
'shell_command': [
155+
'vim',
156+
'top'
157+
]
158+
},
159+
{
160+
'shell_command': ['vim'],
161+
},
162+
{
163+
'shell_command': 'cowsay "hey"'
164+
}
165+
],
166+
'layout': 'main-verticle'
167+
},
164168
{
165169
'window_name': 'logging',
166170
'panes': [
@@ -197,7 +201,6 @@ class ExpandTest(TestCase):
197201
'pwd'
198202
]
199203
},
200-
201204
{
202205
'panes': [
203206
'top'
@@ -344,7 +347,7 @@ class InlineTest(TestCase):
344347
}
345348

346349
def test_config(self):
347-
""":meth:`config.inline()` shell commands list to string where applicable."""
350+
""":meth:`config.inline()` shell commands list to string."""
348351

349352
self.maxDiff = None
350353
test_config = config.inline(self.before_config)
@@ -609,7 +612,10 @@ class ShellCommandBeforeTest(TestCase):
609612
'window_name': 'logging',
610613
'panes': [
611614
{
612-
'shell_command': ['rbenv local 2.0.0-p0', 'tail -F /var/log/syslog'],
615+
'shell_command': [
616+
'rbenv local 2.0.0-p0',
617+
'tail -F /var/log/syslog'
618+
],
613619
},
614620
{
615621
'shell_command': ['rbenv local 2.0.0-p0']
@@ -867,7 +873,9 @@ def test_no_session_name(self):
867873
sconfig = kaptan.Kaptan(handler='yaml')
868874
sconfig = sconfig.import_config(yaml_config).get()
869875

870-
with self.assertRaisesRegexp(exc.ConfigError, 'requires "session_name"'):
876+
with self.assertRaisesRegexp(
877+
exc.ConfigError, 'requires "session_name"'
878+
):
871879
config.validate_schema(sconfig)
872880

873881
def test_no_windows(self):

tmuxp/testsuite/test_config_teamocil.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@ def test_config_to_dict(self):
9393
)
9494
)
9595

96-
def test_config_to_yaml(self):
97-
"""teamocil yaml to tmuxp yaml config
98-
99-
use validate_schema to assert against
100-
"""
101-
pass
102-
10396

10497
class Teamocil2Test(TestCase):
10598

@@ -220,7 +213,10 @@ class Teamocil3Test(TestCase):
220213
'layout': 'even-vertical',
221214
'start_directory': "~/Projects/foo-www",
222215
'shell_command_before': 'rbenv local 2.0.0-p0',
223-
'shell_command_after': 'echo \'I am done initializing this pane.\'',
216+
'shell_command_after': (
217+
'echo '
218+
'\'I am done initializing this pane.\''
219+
),
224220
'panes': [
225221
{
226222
'shell_command': 'git status'
@@ -316,11 +312,12 @@ def test_config_to_dict(self):
316312

317313
class TeamocilLayoutsTest(TestCase):
318314

319-
"""
315+
"""Import configurations from teamocil's <fixtures/layout.yml>.
320316
321317
https://github.com/remiprev/teamocil/blob/master/spec/fixtures/layouts.yml
322318
323319
LICENSE: https://github.com/remiprev/teamocil/blob/master/LICENSE
320+
324321
"""
325322

326323
teamocil_yaml = """\

0 commit comments

Comments
 (0)