]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
unitttest has a SkipTest also but pytest doesn't
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Mar 2014 22:06:20 +0000 (18:06 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Mar 2014 22:06:20 +0000 (18:06 -0400)
honor it unless nose is imported too...

lib/sqlalchemy/testing/plugin/plugin_base.py

index 6a2814109e1bdf9922972dad2476d54acc8850ea..8bdb7b0788d1392ab0fa8de0d95daa825777744f 100644 (file)
@@ -14,13 +14,11 @@ via py.test.
 
 from __future__ import absolute_import
 try:
-    # needs 2.7...
-    from unittest import SkipTest
+    # unitttest has a SkipTest also but pytest doesn't
+    # honor it unless nose is imported too...
+    from nose import SkipTest
 except ImportError:
-    try:
-        from nose import SkipTest
-    except ImportError:
-        from _pytest.runner import Skipped as SkipTest
+    from _pytest.runner import Skipped as SkipTest
 
 import sys
 import re