mkwiatkowski / pinocchio

pinocchio is a set of extensions to the nose unit testing framework for Python
38 stars 13 forks source link

Decorator plugin doesn't work for methods on Python3 #22

Open mkwiatkowski opened 9 years ago

mkwiatkowski commented 9 years ago

Notice the difference in behavior:

$ nosetests --decorator-file examples/test_decorator.attribs examples/test_decorator.py -a meth_one
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
$ nosetests-3.4 --decorator-file examples/test_decorator.attribs examples/test_decorator.py -a meth_one

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

It may be related to how different instance methods behave under Python 3, this piece of code in particular.

little-dude commented 9 years ago

Sorry for breakage, I didn't try with python3... I'll try to look at it this week end.

mkwiatkowski commented 9 years ago

Oh, it's not your fault @little-dude . __dict__ has been used in this piece of code from the beginning. I just noticed this problem when merging in your changes.