- the NoseSQLAlchemyPlugin has been moved to a
new package "sqlalchemy_nose" which installs along with "sqlalchemy". This so that the "nosetests" script works as always but also allows the --with-coverage option to turn on coverage before SQLAlchemy modules are imported, allowing coverage to work correctly. - added some new ignores
This commit is contained in:
parent
aa20e20b88
commit
976df5bf96
|
@ -4,4 +4,7 @@ syntax:regexp
|
|||
.pyc$
|
||||
.orig$
|
||||
.egg-info
|
||||
.*,cover
|
||||
\.coverage
|
||||
\.DS_Store
|
||||
test.cfg
|
||||
|
|
11
CHANGES
11
CHANGES
|
@ -202,7 +202,16 @@ CHANGES
|
|||
- *Major* cleanup / modernization of the Informix
|
||||
dialect for 0.6, courtesy Florian Apolloner.
|
||||
[ticket:1906]
|
||||
|
||||
|
||||
- tests
|
||||
- the NoseSQLAlchemyPlugin has been moved to a
|
||||
new package "sqlalchemy_nose" which installs
|
||||
along with "sqlalchemy". This so that the "nosetests"
|
||||
script works as always but also allows the
|
||||
--with-coverage option to turn on coverage before
|
||||
SQLAlchemy modules are imported, allowing coverage
|
||||
to work correctly.
|
||||
|
||||
- misc
|
||||
- CircularDependencyError now has .cycles and .edges
|
||||
members, which are the set of elements involved in
|
||||
|
|
|
@ -6,7 +6,8 @@ by noseplugin.NoseSQLAlchemy.
|
|||
|
||||
"""
|
||||
|
||||
from sqlalchemy.test import testing, engines, requires, profiling, pickleable, config
|
||||
from sqlalchemy_nose import config
|
||||
from sqlalchemy.test import testing, engines, requires, profiling, pickleable
|
||||
from sqlalchemy.test.schema import Column, Table
|
||||
from sqlalchemy.test.testing import \
|
||||
AssertsCompiledSQL, \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import sys, types, weakref
|
||||
from collections import deque
|
||||
import config
|
||||
from sqlalchemy_nose import config
|
||||
from sqlalchemy.util import function_named, callable
|
||||
import re
|
||||
import warnings
|
||||
|
|
|
@ -6,7 +6,7 @@ in a more fine-grained way than nose's profiling plugin.
|
|||
"""
|
||||
|
||||
import os, sys
|
||||
from sqlalchemy.test import config
|
||||
from sqlalchemy_nose import config
|
||||
from sqlalchemy.test.util import function_named, gc_collect
|
||||
from nose import SkipTest
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ import types
|
|||
import warnings
|
||||
from cStringIO import StringIO
|
||||
|
||||
from sqlalchemy.test import config, assertsql, util as testutil
|
||||
from sqlalchemy_nose import config
|
||||
from sqlalchemy.test import assertsql, util as testutil
|
||||
from sqlalchemy.util import function_named, py3k
|
||||
from engines import drop_all_tables
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import StringIO
|
|||
import nose.case
|
||||
from nose.plugins import Plugin
|
||||
|
||||
from sqlalchemy import util, log as sqla_log
|
||||
from sqlalchemy.test import testing, config, requires
|
||||
from sqlalchemy.test.config import (
|
||||
from sqlalchemy_nose import config
|
||||
|
||||
from sqlalchemy_nose.config import (
|
||||
_create_testing_engine, _engine_pool, _engine_strategy, _engine_uri, _list_dbs, _log,
|
||||
_prep_testing_database, _require, _reverse_topological, _server_side_cursors,
|
||||
_set_table_options, base_config, db, db_label, db_url, file_config, post_configure)
|
||||
|
@ -78,6 +78,10 @@ class NoseSQLAlchemy(Plugin):
|
|||
self.options = options
|
||||
|
||||
def begin(self):
|
||||
global testing, requires, util
|
||||
from sqlalchemy.test import testing, requires
|
||||
from sqlalchemy import util
|
||||
|
||||
testing.db = db
|
||||
testing.requires = requires
|
||||
|
12
setup.py
12
setup.py
|
@ -56,11 +56,11 @@ elif BUILD_CEXTENSIONS:
|
|||
|
||||
def find_packages(dir_):
|
||||
packages = []
|
||||
for _dir, subdirectories, files in os.walk(os.path.join(dir_,
|
||||
'sqlalchemy')):
|
||||
if '__init__.py' in files:
|
||||
lib, fragment = _dir.split(os.sep, 1)
|
||||
packages.append(fragment.replace(os.sep, '.'))
|
||||
for pkg in ['sqlalchemy', 'sqlalchemy_nose']:
|
||||
for _dir, subdirectories, files in os.walk(os.path.join(dir_, pkg)):
|
||||
if '__init__.py' in files:
|
||||
lib, fragment = _dir.split(os.sep, 1)
|
||||
packages.append(fragment.replace(os.sep, '.'))
|
||||
return packages
|
||||
|
||||
if sys.version_info < (2, 4):
|
||||
|
@ -90,7 +90,7 @@ setup(name = "SQLAlchemy",
|
|||
test_suite = "nose.collector",
|
||||
entry_points = {
|
||||
'nose.plugins.0.10': [
|
||||
'sqlalchemy = sqlalchemy.test.noseplugin:NoseSQLAlchemy',
|
||||
'sqlalchemy = sqlalchemy_nose.noseplugin:NoseSQLAlchemy',
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
Loading…
Reference in New Issue