* [gentoo-commits] gentoo-x86 commit in dev-python/nose/files: nose-1.3.1-pypy-test.patch
@ 2014-04-11 13:48 Ian Delaney (idella4)
0 siblings, 0 replies; only message in thread
From: Ian Delaney (idella4) @ 2014-04-11 13:48 UTC (permalink / raw
To: gentoo-commits
idella4 14/04/11 13:48:26
Added: nose-1.3.1-pypy-test.patch
Log:
patch to fix tests broken under pypy
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Revision Changes Path
1.1 dev-python/nose/files/nose-1.3.1-pypy-test.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/nose/files/nose-1.3.1-pypy-test.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/nose/files/nose-1.3.1-pypy-test.patch?rev=1.1&content-type=text/plain
Index: nose-1.3.1-pypy-test.patch
===================================================================
https://github.com/nose-devs/nose/commit/0181572a64195a8fa1c6c867ae6c61a79a9606ca.diff
diff --git a/nose/util.py b/nose/util.py
index dcb5fef..e612696 100644
--- a/nose/util.py
+++ b/nose/util.py
@@ -447,11 +447,10 @@ def try_run(obj, names):
if func is not None:
if type(obj) == types.ModuleType:
# py.test compatibility
- try:
- args, varargs, varkw, defaults = inspect.getargspec(func)
- if hasattr(func, '__call__') and ismethod(func.__call__):
- args.pop(0)
- except TypeError:
+ if isinstance(func, types.FunctionType):
+ args, varargs, varkw, defaults = \
+ inspect.getargspec(func)
+ else:
# Not a function. If it's callable, call it anyway
if hasattr(func, '__call__'):
func = func.__call__
diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py
index 2bd837c..cd9ba6e 100644
--- a/unit_tests/test_utils.py
+++ b/unit_tests/test_utils.py
@@ -1,4 +1,5 @@
import os
+import sys
import unittest
import nose
from nose import case
@@ -168,7 +169,7 @@ def __call__(self):
class Bar_m:
def __call__(self, mod):
pass
-
+
foo = imp.new_module('foo')
foo.bar = bar
foo.bar_m = bar_m
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-11 13:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11 13:48 [gentoo-commits] gentoo-x86 commit in dev-python/nose/files: nose-1.3.1-pypy-test.patch Ian Delaney (idella4)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox