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
#!/usr/bin/python | |
# calculator.py | |
class Calculator: | |
def add(self, x, y): | |
return x+y |
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
#!/usr/bin/python | |
# calculator_test.py | |
from calculator import Calculator | |
def should_add_two_numbers_correctly(): | |
assert Calculator().add(2, 2) == 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment