Created
April 27, 2016 09:19
-
-
Save yuda110/77b34d984744bfafd21ce910fa2c637b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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