284 def test_findAlgorithms( self ):
285 a1 = findAlgorithm( self.top, "SomeAlg0" )
286 self.assertIsNotNone( a1, "Can't find algorithm present in sequence" )
287
288 a1 = findAlgorithm( self.top, "SomeAlg1" )
289 self.assertIsNotNone( a1, "Can't find nested algorithm " )
290
291 nest2 = findSubSequence( self.top, "nest2" )
292
293 a1 = findAlgorithm( nest2, "SomeAlg0" )
294 self.assertIsNone( a1, "Finding algorithm that is in the upper sequence" )
295
296 a1 = findAlgorithm( nest2, "NonexistentAlg" )
297 self.assertIsNone( a1, "Finding algorithm that is does not exist" )
298
299 a1 = findAlgorithm( self.top, "SomeAlg0", 1)
300 self.assertIsNotNone( a1, "Could not find algorithm within the required nesting depth == 1" )
301
302 a1 = findAlgorithm( self.top, "SomeAlg1", 1)
303 self.assertIsNone( a1, "Could find algorithm even if it is deep in sequences structure" )
304
305 a1 = findAlgorithm( self.top, "SomeAlg1", 2)
306 self.assertIsNotNone( a1, "Could not find algorithm within the required nesting depth == 2" )
307
308 a1 = findAlgorithm( self.top, "SomeAlg3", 2)
309 self.assertIsNotNone( a1 is None, "Could find algorithm even if it is deep in sequences structure" )
310
311