Created
April 6, 2016 21:47
-
-
Save david-sosa-valdes/b3e7ebf35090771be010381462eb3f2f to your computer and use it in GitHub Desktop.
Math equation balance (excercise)
This file contains hidden or 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 | |
class MathBalance(object): | |
def check(self, equation = ''): | |
return True | |
class TestMathCases(unittest.TestCase): | |
def test_first(self): | |
m = MathBalance() | |
self.assertEqual(True, m.check('(Ax + BY)')) | |
def test_second(self): | |
m = MathBalance() | |
self.assertEqual(False, m.check('(d(x+y()')) | |
def test_third(self): | |
m = MathBalance() | |
self.assertEqual(False, m.check(')A+b(')) | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment