1313logger = logging .getLogger (__name__ )
1414
1515
16- @unittest .skip ('test' )
1716class TmuxObjectTest (TmuxTestCase ):
1817
1918 ''' test the :class:`TmuxRelationalObject` base class object.
@@ -25,7 +24,6 @@ def test_findWhere(self):
2524 # server.findWhere
2625 for session in t .sessions :
2726 session_id = session .get ('session_id' )
28- logger .error (session_id )
2927
3028 self .assertEqual (t .findWhere ({'session_id' : session_id }), session )
3129 self .assertIsInstance (t .findWhere ({
@@ -35,10 +33,12 @@ def test_findWhere(self):
3533 for window in session .windows :
3634 window_id = window .get ('window_id' )
3735
38- self .assertEqual (session .findWhere (
39- {'window_id' : window_id }), window )
40- self .assertIsInstance (session .findWhere (
41- {'window_id' : window_id }), Window )
36+ self .assertEqual (
37+ session .findWhere ({'window_id' : window_id }), window
38+ )
39+ self .assertIsInstance (
40+ session .findWhere ({'window_id' : window_id }), Window
41+ )
4242
4343 # window.findWhere
4444 for pane in window .panes :
@@ -53,7 +53,7 @@ def test_findWhere_multiple_attrs(self):
5353 '''.findWhere returns objects with multiple attributes
5454 '''
5555
56- for session in t ._sessions :
56+ for session in t .sessions :
5757 session_id = session .get ('session_id' )
5858 session_name = session .get ('session_name' )
5959 find_where = t .findWhere ({
@@ -96,7 +96,7 @@ def test_where(self):
9696 window = self .session .attached_window ()
9797 window .split_window () # create second pane
9898
99- for session in t ._sessions :
99+ for session in t .sessions :
100100 session_id = session .get ('session_id' )
101101 session_name = session .get ('session_name' )
102102 where = t .where ({
@@ -146,7 +146,7 @@ def test_getById(self):
146146
147147 window .split_window () # create second pane
148148
149- for session in t ._sessions :
149+ for session in t .sessions :
150150 session_id = session .get ('session_id' )
151151 session_name = session .get ('session_name' )
152152 get_by_id = t .getById (session_id )
@@ -184,51 +184,5 @@ def test_getById(self):
184184 '%' + str (random .randint (50000 , 90000 ))
185185 ))
186186
187-
188- class ReferenceTestCase (TmuxTestCase ):
189-
190- @unittest .skip ('not doing yet, complete unit tests first' )
191- def test_mutability (self ):
192- # window = self.session.attached_window()
193-
194- # window.split_window() # create second pane
195-
196- for session in t ._sessions :
197- session_id = session .get ('session_id' )
198- session_name = session .get ('session_name' )
199- get_by_id = t .getById (session_id )
200-
201- for x in range (random .randint (1 , 6 )):
202- window = session .new_window ()
203-
204- for window in session .windows :
205- for y in range (random .randint (1 , 3 )):
206- try :
207- pane = window .split_window ()
208- except Exception as e :
209- logger .debug (e )
210- pass
211-
212- # session.getById
213- last_window = None
214- for window in session .windows :
215- window_id = window .get ('window_id' )
216- window_index = window .get ('window_index' )
217-
218- if last_window :
219- self .assertEqual (last_window .session , window .session )
220- self .assertEqual (id (
221- last_window .session ), id (window .session ))
222- self .assertNotEqual (last_window , window )
223- self .assertNotEqual (id (last_window ), id (window ))
224- last_window = window
225-
226- # window.getById
227- for pane in window .panes :
228- pane_id = pane .get ('pane_id' )
229- pane_tty = pane .get ('pane_tty' )
230-
231- get_by_id = window .getById (pane_id )
232-
233187if __name__ == '__main__' :
234188 unittest .main ()
0 commit comments