Mike Bayer  committed a4e84a1

- cx_oracle test for "unicode returns" needs to be cx_oracle only,
and also will fail on py3k.
- enhance exclusions so that a requirement attribute can be passed
to fails_if/skip_if.
- fix coverage docs to mention pytest.

  • Participants
  • Parent commits 4175ca2

Comments (0)

Files changed (4)

File README.unittests.rst

-Coverage is tracked using Nose's coverage plugin.   See the nose
-documentation for details.  Basic usage is::
+Coverage is tracked using the coverage plugins built for pytest or nose::
+    $ py.test test/sql/test_query --cov=sqlalchemy
     $ ./ test.sql.test_query --with-coverage

File lib/sqlalchemy/testing/

 import operator
-from nose import SkipTest
+from .plugin.plugin_base import SkipTest
 from ..util import decorator
 from . import config
 from .. import util
     def as_predicate(cls, predicate):
         if isinstance(predicate, skip_if):
-            return predicate.predicate
+            return NotPredicate(predicate.predicate)
         elif isinstance(predicate, Predicate):
             return predicate
         elif isinstance(predicate, list):

File lib/sqlalchemy/testing/plugin/

     global util, fixtures, engines, exclusions, \
                     assertions, warnings, profiling,\
                     config, testing
-    from sqlalchemy import testing
     from sqlalchemy.testing import fixtures, engines, exclusions, \
                     assertions, warnings, profiling, config
     from sqlalchemy import util

File test/dialect/

         value = testing.db.scalar("SELECT 5.66 FROM DUAL")
         assert isinstance(value, decimal.Decimal)
+    @testing.only_on("oracle+cx_oracle", "cx_oracle-specific feature")
+    @testing.fails_if(
+                    testing.requires.python3,
+                    "cx_oracle always returns unicode on py3k")
     def test_coerce_to_unicode(self):
         engine = testing_engine(options=dict(coerce_to_unicode=True))
         value = engine.scalar("SELECT 'hello' FROM DUAL")