Created
April 11, 2012 16:17
-
-
Save OddBloke/2360312 to your computer and use it in GitHub Desktop.
nose multiprocessing failure
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 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