python tests/test_pipeline.py
Created
July 15, 2016 22:04
-
-
Save redshiftzero/97e48c89614d76cb685582b435c21e89 to your computer and use it in GitHub Desktop.
Tests example for Jan for Python 2.7
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
# empty |
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
def my_func(arg): | |
return 1 + arg |
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 | |
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gists won't let me have / in examples so i put a 1 instead!