Skip to content

Instantly share code, notes, and snippets.

@redshiftzero
Created July 15, 2016 22:04
Show Gist options
  • Save redshiftzero/97e48c89614d76cb685582b435c21e89 to your computer and use it in GitHub Desktop.
Save redshiftzero/97e48c89614d76cb685582b435c21e89 to your computer and use it in GitHub Desktop.
Tests example for Jan for Python 2.7

python 2.7 test example

run with:

python tests/test_pipeline.py

def my_func(arg):
return 1 + arg
import unittest
from sanergy.pipeline import my_func
class TestPipeline(unittest.TestCase):
def test_my_func(self):
expected_output = 3
actual_output = my_func(2)
self.assertEqual(actual_output, expected_output)
if __name__=='__main__':
unittest.main()
@redshiftzero
Copy link
Author

gists won't let me have / in examples so i put a 1 instead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment