Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import unittest
import solution
class PowerOfTwoTests(unittest.TestCase):
def test_empty_list(self):
self.assertFalse(solution.powers_of_two_remain([]))
def test_multiple_numbers_in_list_true(self):
self.assertTrue(solution.powers_of_two_remain([7, 8]))
def test_multiple_numbers_in_list_true_twl(self):
self.assertTrue(solution.powers_of_two_remain([2, 6, 8, 10]))
def test_multiple_numbers_in_list_false_one(self):
self.assertFalse(solution.powers_of_two_remain([4, 8, 12]))
def test_multiple_numbers_in_list_true_tw(self):
self.assertTrue(solution.powers_of_two_remain([1, 7, 5, 11]))
def test_multiple_numbers_in_list_false_th(self):
self.assertFalse(solution.powers_of_two_remain([6, 5, 3, 10, 8, 2]))
def test_multiple_numbers_in_list_false_fth(self):
self.assertFalse(solution.powers_of_two_remain([1, 2, 4, 5, 7, 8, 13]))
def test_multiple_numbers_in_list_false_sx(self):
self.assertFalse(solution.powers_of_two_remain([1, 2, 4, 7]))
def test_multiple_numbers_in_list_true_sv(self):
self.assertTrue(solution.powers_of_two_remain([10, 8, 2, 12]))
def test_multiple_numbers_in_list_true_ght(self):
self.assertTrue(solution.powers_of_two_remain([1, 2, 3, 4, 5, 6, 7, 8]))
def test_multiple_numbers_in_list_false_n(self):
self.assertFalse(solution.powers_of_two_remain([1, 1, 2, 2, 4, 4]))
def test_multiple_numbers_in_list_true_lv(self):
self.assertTrue(solution.powers_of_two_remain([7, 4, 16, 8, 4, 8]))
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.