Created
May 15, 2017 14:43
-
-
Save rdammkoehler/ead42fba24160613714e23d518ee5232 to your computer and use it in GitHub Desktop.
Undry Impl of Foo.py
This file contains 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
from unittest import TestCase | |
import nose.tools as nt | |
def foo(x,y): | |
return (x+y), (x*y) | |
class FooTests_0(TestCase): | |
def test_foo_does_add(self): | |
x = 5 | |
y = 5 | |
expect = 10 | |
(result, _) = foo(x,y) | |
nt.assert_equals(expect, result) | |
def test_foo_does_multiply(self): | |
x = 5 | |
y = 5 | |
expect = 25 | |
(_, result) = foo(x,y) | |
nt.assert_equals(expect, result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment