Skip to content

Instantly share code, notes, and snippets.

@rdammkoehler
Created May 15, 2017 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdammkoehler/ead42fba24160613714e23d518ee5232 to your computer and use it in GitHub Desktop.
Save rdammkoehler/ead42fba24160613714e23d518ee5232 to your computer and use it in GitHub Desktop.
Undry Impl of Foo.py
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