Skip to content

Instantly share code, notes, and snippets.

@OddBloke
Created April 11, 2012 16:17
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 OddBloke/2360312 to your computer and use it in GitHub Desktop.
Save OddBloke/2360312 to your computer and use it in GitHub Desktop.
nose multiprocessing failure
from nose.tools import make_decorator
class decorate(object):
def __init__(self, numbers):
self.numbers = numbers
def __call__(self, f):
def wrap(args):
f(*args)
@make_decorator(f)
def new_f(*args, **kwargs):
for numbers in self.numbers:
yield wrap, numbers
return new_f
@decorate([(1,1), (2,2), (3,3)])
def test_foo(x, y):
assert x == y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment