Skip to content

Instantly share code, notes, and snippets.

@yuda110
Created April 27, 2016 09:19
Show Gist options
  • Save yuda110/77b34d984744bfafd21ce910fa2c637b to your computer and use it in GitHub Desktop.
Save yuda110/77b34d984744bfafd21ce910fa2c637b to your computer and use it in GitHub Desktop.
import project_euler_36
import unittest
class TestSplitFunction(unittest.TestCase) :
def setUp(self):
pass
def tearDown(self):
pass
def test_get_binary_num(self) :
r = e36.get_binary_num(585)
self.assertEqual(r, '1001001001')
def test_is_palindrome(self):
r = e36.is_palindrome(585)
self.assertTrue(r)
r = e36.is_palindrome(600)
self.assertFalse(r)
r = e36.is_palindrome(1001001001)
self.assertTrue(r)
def test_get_palindrome(self):
r = e36.get_palindrome(1000000)
self.assertEqual(r, '')
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment