Created
February 14, 2013 00:02
-
-
Save bernardobarreto/4949572 to your computer and use it in GitHub Desktop.
basic python test
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
| # bola.py | |
| class Bola(object): | |
| def __init__(self, cor): | |
| self.cor = cor | |
| # bola_test.py | |
| import unittest | |
| from should_dsl import should | |
| from bola import Bola | |
| class BolaTest(unittest.TestCase): | |
| def test_ball_has_color(self): | |
| b = Bola('blue') | |
| b.cor |should| equal_to('blue') | |
| if __name__ == "__main__": | |
| unittest.main() | |
| #run: python bola_test.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment