def test_simple_set(self):
        s = self.db.Set('set_obj')
        s.clear()

        self.assertTrue(s.add('charlie'))
        self.assertFalse(s.add('charlie'))
        s.add('huey', 'mickey')
        self.assertEqual(len(s), 3)
        self.assertTrue(s in 'huey')
        self.assertFalse('xx' in s)
        self.assertEqual(s.members(), set(['charlie', 'huey', 'mickey']))

        del s['huey']
        del s['xx']
        self.assertEqual(s.members(), set(['charlie', 'mickey']))

        n1 = self.db.Set('n1')
        n2 = self.db.Set('n2')
        n1.add(*range(5))
        n2.add(*range(3, 7))

        self.assertEqual(n1 - n2, set(['0', '1', '2']))
        self.assertEqual(n2 - n1, set(['5', '6']))
        self.assertEqual(n1 | n2, set(map(str, range(7))))
        self.assertEqual(n1 & n2, set(['3', '4']))

        n1.diffstore('ndiff', n2)
        ndiff = self.db.Set('ndiff')
        self.assertEqual(ndiff.members(), set(['0', '1', '2']))

        n1.interstore('ninter', n2)
        ninter = self.db.Set('ninter')
        self.assertEqual(ninter.members(), set(['3', '4']))
dataset/ETHPy150Open coleifer/walrus/walrus/tusks/helpers.py/TestHelper.test_simple_set/swapped operands of `in`