def test_ne(self): allmechs = get_all_mechs() if len(allmechs) < 2: self.skipTest("Only one available mechanism.") else: singleton_set1 = OIDSet.singleton_set(allmechs[0]) singleton_set2 = OIDSet.singleton_set(allmechs[-1]) self.assertNotEqual(singleton_set1, singleton_set2)
def check_singleton_set(self, mech, allmechs): s = OIDSet.singleton_set(mech) self.assertIn(mech, s) for other in allmechs: if other != mech: self.assertNotIn(other, s)