From: Mike Bayer Date: Mon, 15 Sep 2014 01:06:27 +0000 (-0400) Subject: - py3k fix X-Git-Tag: rel_0_7_0~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91fa4c32510b06584b83cacdf6521d75093793c8;p=thirdparty%2Fsqlalchemy%2Falembic.git - py3k fix --- diff --git a/alembic/testing/plugin/noseplugin.py b/alembic/testing/plugin/noseplugin.py index 3235d4fb..bb96d061 100644 --- a/alembic/testing/plugin/noseplugin.py +++ b/alembic/testing/plugin/noseplugin.py @@ -71,6 +71,8 @@ class NoseSQLAlchemy(Plugin): def wantMethod(self, fn): if py3k: + if not hasattr(fn.__self__, 'cls'): + return False cls = fn.__self__.cls else: cls = fn.im_class @@ -80,9 +82,10 @@ class NoseSQLAlchemy(Plugin): return plugin_base.want_class(cls) def beforeTest(self, test): - plugin_base.before_test(test, - test.test.cls.__module__, - test.test.cls, test.test.method.__name__) + plugin_base.before_test( + test, + test.test.cls.__module__, + test.test.cls, test.test.method.__name__) def afterTest(self, test): plugin_base.after_test(test)