Skip to content

Instantly share code, notes, and snippets.

@Grigorov-
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Grigorov-/f03124245ac5a51ac9b1 to your computer and use it in GitHub Desktop.
Save Grigorov-/f03124245ac5a51ac9b1 to your computer and use it in GitHub Desktop.
import unittest
import solution
import random
class RandomListOfNumbers:
def __init__(self):
self.numbers = [random.randint(1, 1000)
for x in range(random.randint(1, 10))]
class TestPowers(unittest.TestCase):
def setUp(self):
self.numbers = RandomListOfNumbers().numbers
def test_type(self):
self.assertEqual(
type(solution.powers_of_two_remain(self.numbers)), bool)
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment