Skip to content

Instantly share code, notes, and snippets.

@bernardobarreto
Created February 14, 2013 00:02
Show Gist options
  • Select an option

  • Save bernardobarreto/4949572 to your computer and use it in GitHub Desktop.

Select an option

Save bernardobarreto/4949572 to your computer and use it in GitHub Desktop.
basic python test
# 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