2626class SessionTest (TmuxTestCase ):
2727
2828 def test_has_session (self ):
29- """Server.has_session returns True if has session_name exists"""
29+ """Server.has_session returns True if has session_name exists. """
3030 self .assertTrue (t .has_session (self .TEST_SESSION_NAME ))
3131 self .assertFalse (t .has_session ('asdf2314324321' ))
3232
3333 def test_select_window (self ):
34- """Session.select_window moves window"""
34+ """Session.select_window moves window. """
3535 # get the current window_base_index, since different user tmux config
3636 # may start at 0 or 1, or whatever they want.
3737 window_base_index = int (
38- self .session .attached_window ().get ('window_index' ))
38+ self .session .attached_window ().get ('window_index' )
39+ )
3940
4041 window = self .session .new_window (window_name = 'test_window' )
4142 window_count = len (self .session ._windows )
@@ -67,7 +68,7 @@ def test_select_window(self):
6768 selected_window1 .__dict__ , selected_window2 .__dict__ )
6869
6970 def test_select_window_returns_Window (self ):
70- """Session.select_window returns Window object"""
71+ """Session.select_window returns Window object. """
7172
7273 window_count = len (self .session ._windows )
7374 self .assertEqual (len (self .session ._windows ), window_count )
@@ -78,15 +79,15 @@ def test_select_window_returns_Window(self):
7879 window_base_index ), Window )
7980
8081 def test_attached_window (self ):
81- """Session.attached_window() returns Window"""
82+ """Session.attached_window() returns Window. """
8283 self .assertIsInstance (self .session .attached_window (), Window )
8384
8485 def test_attached_pane (self ):
85- """Session.attached_pane() returns Pane"""
86+ """Session.attached_pane() returns Pane. """
8687 self .assertIsInstance (self .session .attached_pane (), Pane )
8788
8889 def test_session_rename (self ):
89- """Session.rename_session renames session"""
90+ """Session.rename_session renames session. """
9091 test_name = 'testingdis_sessname'
9192 self .session .rename_session (test_name )
9293 self .assertEqual (self .session .get ('session_name' ), test_name )
@@ -100,7 +101,7 @@ def test_session_rename(self):
100101class SessionNewTest (TmuxTestCase ):
101102
102103 def test_new_session (self ):
103- """Server.new_session creates new session"""
104+ """Server.new_session creates new session. """
104105 new_session_name = TEST_SESSION_PREFIX + str (randint (0 , 1337 ))
105106 new_session = t .new_session (session_name = new_session_name , detach = True )
106107
@@ -117,8 +118,7 @@ def test_show_options(self):
117118 self .assertIsInstance (options , dict )
118119
119120 def test_set_show_options_single (self ):
120- """Set option then Session.show_options(key)
121- """
121+ """Set option then Session.show_options(key)."""
122122
123123 self .session .set_option ('history-limit' , 20 )
124124 self .assertEqual (20 , self .session .show_options ('history-limit' ))
@@ -129,8 +129,7 @@ def test_set_show_options_single(self):
129129 self .assertEqual (40 , self .session .show_options ()['history-limit' ])
130130
131131 def test_set_show_option (self ):
132- """Set option then Session.show_option(key)
133- """
132+ """Set option then Session.show_option(key)."""
134133 self .session .set_option ('history-limit' , 20 )
135134 self .assertEqual (20 , self .session .show_option ('history-limit' ))
136135
@@ -139,6 +138,6 @@ def test_set_show_option(self):
139138 self .assertEqual (40 , self .session .show_option ('history-limit' ))
140139
141140 def test_set_option_bad (self ):
142- """Session.set_option raises ValueError for bad option key"""
141+ """Session.set_option raises ValueError for bad option key. """
143142 with self .assertRaises (ValueError ):
144143 self .session .set_option ('afewewfew' , 43 )
0 commit comments