def test_fresh_const_name(self):
     ctx = SolverContext(z3.Context())
     name1 = ctx.fresh_constraint_name()
     name2 = ctx.fresh_constraint_name()
     self.assertTrue(isinstance(name1, basestring))
     self.assertTrue(isinstance(name2, basestring))
     self.assertFalse(name1 == name2)
 def test_fresh_const_name_prefix(self):
     # Arrange
     ctx = SolverContext(z3.Context())
     prefix = 'CustPrefix'
     # Act
     name1 = ctx.fresh_constraint_name(prefix=prefix)
     name2 = ctx.fresh_constraint_name(prefix=prefix)
     # Assert
     self.assertTrue(isinstance(name1, basestring))
     self.assertTrue(isinstance(name2, basestring))
     self.assertFalse(name1 == name2)
     self.assertTrue(name1.startswith(prefix))
     self.assertTrue(name2.startswith(prefix))