Skip to content

Commit 304cd14

Browse files
committed
Fix string concatenation in pep8 in test_config_tmuxinator. PEP257 and PEP8
1 parent 760b602 commit 304cd14

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

tmuxp/testsuite/test_config_tmuxinator.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,8 @@ class TmuxinatorDeprecationsTest(TestCase):
150150
{
151151
'editor': {
152152
'pre': [
153-
(
154-
'echo "I get run in each pane,',
155-
'before each pane command!"'
156-
),
153+
'echo "I get run in each pane, '
154+
'before each pane command!"',
157155
None
158156
],
159157
'layout': 'main-vertical',
@@ -283,7 +281,7 @@ def test_config_to_dict(self):
283281

284282
class TmuxinatoriSampleTest(TestCase):
285283

286-
"""Tests against tmuxinator's <spec/fixtures/sample.yml>.
284+
"""Test importing <spec/fixtures/sample.yml>.
287285
288286
https://github.com/aziz/tmuxinator/blob/master/spec/fixtures/sample.yml
289287
@@ -342,10 +340,8 @@ class TmuxinatoriSampleTest(TestCase):
342340
{
343341
'editor': {
344342
'pre': [
345-
(
346-
'echo "I get run in each pane, ',
347-
'before each pane command!"'
348-
),
343+
'echo "I get run in each pane, '
344+
'before each pane command!"',
349345
None
350346
],
351347
'layout': 'main-vertical',

tmuxp/testsuite/test_tmuxobject.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,18 @@ class TmuxObjectTest(TmuxTestCase):
2525
"""Test the :class:`TmuxRelationalObject` base class object."""
2626

2727
def test_findWhere(self):
28-
"""findWhere."""
28+
"""Test that findWhere() retrieves single matching object."""
2929
self.maxDiff = None
3030
# server.findWhere
3131
for session in t.sessions:
3232
session_id = session.get('session_id')
3333

3434
self.assertEqual(t.findWhere({'session_id': session_id}), session)
35-
self.assertIsInstance(t.findWhere({
36-
'session_id': session_id}), Session)
35+
self.assertIsInstance(
36+
t.findWhere({
37+
'session_id': session_id
38+
}), Session
39+
)
3740

3841
# session.findWhere
3942
for window in session.windows:
@@ -96,7 +99,7 @@ def test_findWhere_multiple_attrs(self):
9699
self.assertIsInstance(find_where, Pane)
97100

98101
def test_where(self):
99-
""".where"""
102+
"""Test self.where() returns matching objects."""
100103

101104
window = self.session.attached_window()
102105
window.split_window() # create second pane
@@ -145,7 +148,7 @@ def test_where(self):
145148
self.assertIsInstance(where[0], Pane)
146149

147150
def test_getById(self):
148-
""".getById"""
151+
"""Test self.getById() retrieves child object."""
149152

150153
window = self.session.attached_window()
151154

tmuxp/testsuite/test_window.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ def test_zfresh_window_data(self):
9393
class NewTest2(TmuxTestCase):
9494

9595
def test_newest_pane_data(self):
96-
# self.session.select_window(1)
97-
#
98-
#
9996
window = self.session.new_window(window_name='test', attach=True)
10097
self.assertIsInstance(window, Window)
10198
self.assertEqual(1, len(window.panes))
@@ -111,7 +108,7 @@ def test_newest_pane_data(self):
111108
class NewTest3(TmuxTestCase):
112109

113110
def test_attached_pane(self):
114-
"""Window.attached_window() returns active Pane"""
111+
"""Window.attached_window() returns active Pane."""
115112

116113
window = self.session.attached_window() # current window
117114
self.assertIsInstance(window.attached_pane(), Pane)
@@ -134,7 +131,7 @@ class RenameTest(TmuxTestCase):
134131
window_name_after = 'ha ha ha fjewlkjflwef'
135132

136133
def test_window_rename(self):
137-
"""Window.rename_window.rename_window()"""
134+
"""Window.rename_window()."""
138135
self.session.set_option('automatic-rename', 'off')
139136
window = self.session.new_window(
140137
window_name=self.window_name_before, attach=True)
@@ -183,8 +180,7 @@ def test_show_window_options(self):
183180
self.assertIsInstance(options, dict)
184181

185182
def test_set_show_window_options(self):
186-
"""Set option then Window.show_window_options(key)
187-
"""
183+
"""Set option then Window.show_window_options(key)."""
188184
window = self.session.new_window(window_name='test_window')
189185

190186
window.set_window_option('main-pane-height', 20)
@@ -196,8 +192,7 @@ def test_set_show_window_options(self):
196192
self.assertEqual(40, window.show_window_options()['main-pane-height'])
197193

198194
def test_show_window_option(self):
199-
"""Set option then Window.show_window_option(key)
200-
"""
195+
"""Set option then Window.show_window_option(key)."""
201196
window = self.session.new_window(window_name='test_window')
202197

203198
window.set_window_option('main-pane-height', 20)
@@ -209,7 +204,7 @@ def test_show_window_option(self):
209204
self.assertEqual(40, window.show_window_option('main-pane-height'))
210205

211206
def test_set_window_option_bad(self):
212-
"""Window.set_window_option raises ValueError for bad option key"""
207+
"""Window.set_window_option raises ValueError for bad option key."""
213208

214209
window = self.session.new_window(window_name='test_window')
215210

0 commit comments

Comments
 (0)