Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_powerset(self):
n = 2
powerset_ = list(powerset(n))
self.assertEqual(powerset_, [(), (0,), (1,), (0, 1)])
n = 3
powerset_ = list(powerset(n))
self.assertEqual(
powerset_, [(), (0,), (1,), (2,), (0, 1), (0, 2), (1, 2), (0, 1, 2)]
)
def test_powerset(self):
n = 2
powerset_ = list(powerset(n))
self.assertEqual(powerset_, [(), (0,), (1,), (0, 1)])
n = 3
powerset_ = list(powerset(n))
self.assertEqual(
powerset_, [(), (0,), (1,), (2,), (0, 1), (0, 2), (1, 2), (0, 1, 2)]
)