def testAssureScopeWithPopulation_existingScopeDifferentSizes(self): pool = Pool(self.pool) try: pool.AssureScopeWithPopulation("S1", 3) self.fail("Expected exception was not thrown") except Pool.Exception, e: self.assertEqual( "Requested size for scope 'S1' was 3 but it is actually 1", e.what)
def testAssureScopeWithPopulation_newScope(self): pool = Pool(self.pool) pool.AssureScopeWithPopulation("NewScope", 4) self.assertEqual(4, pool.GetScopeSize("NewScope"))
def testAssureScopeWithPopulation_existingScopeSameSize(self): pool = Pool(self.pool) pool.AssureScopeWithPopulation("S1", 1) self.assertEqual(1, pool.GetScopeSize("S1"))