Last active
August 10, 2020 09:36
-
-
Save imShakil/a25cb22b0f328794c23e9fe0c6a6bf79 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 unittest | |
def square_items(list_of_number): | |
return [item ** 2 for item in list_of_number] | |
class TestUnitTest(unittest.TestCase): | |
def test_square_items(self): | |
self.assertEqual(square_items([1, 2, 3, 4]), [1, 4, 9, 16]) | |
if __name__ == "__main__": | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment