Skip to content

Instantly share code, notes, and snippets.

@czeildi
Created August 22, 2017 13:21
Show Gist options
  • Save czeildi/747ed39d276761153b3e5c34e153ac39 to your computer and use it in GitHub Desktop.
Save czeildi/747ed39d276761153b3e5c34e153ac39 to your computer and use it in GitHub Desktop.
python dojo skeleton with unittest
class Dojo:
def __init__(self, input):
self.input = input
def calculate(self):
return 42
# run tests from terminal with python test-dojo.py
import unittest
from dojo import Dojo
class DojoTest(unittest.TestCase):
def test_calculate_dummy(self):
d = Dojo("42")
self.assertEqual(42, d.calculate())
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment