Add dependency test matrix
This commit is contained in:
@@ -13,7 +13,12 @@ python:
|
||||
- 3.3
|
||||
- 3.4
|
||||
|
||||
env:
|
||||
- EXTRAS=test
|
||||
- EXTRAS=test_all
|
||||
|
||||
install:
|
||||
- pip install -e ".[test]"
|
||||
- pip install -e .[$EXTRAS]
|
||||
|
||||
script:
|
||||
- py.test
|
||||
|
6
setup.py
6
setup.py
@@ -36,7 +36,6 @@ extras_require = {
|
||||
'pytz>=2014.2',
|
||||
'python-dateutil>=2.2',
|
||||
'pymysql',
|
||||
'colour>=0.0.4'
|
||||
],
|
||||
'anyjson': ['anyjson>=0.3.3'],
|
||||
'babel': ['Babel>=1.3'],
|
||||
@@ -53,9 +52,10 @@ extras_require = {
|
||||
|
||||
|
||||
# Add all optional dependencies to testing requirements.
|
||||
test_all = []
|
||||
for name, requirements in extras_require.items():
|
||||
if name != 'test':
|
||||
extras_require['test'] += requirements
|
||||
test_all += requirements
|
||||
extras_require['test_all'] = test_all
|
||||
|
||||
|
||||
setup(
|
||||
|
@@ -17,10 +17,6 @@ def count_sql_calls(conn, cursor, statement, parameters, context, executemany):
|
||||
conn.query_count += 1
|
||||
except AttributeError:
|
||||
conn.query_count = 0
|
||||
try:
|
||||
conn.queries.append(statement)
|
||||
except AttributeError:
|
||||
conn.queries = [statement]
|
||||
|
||||
|
||||
warnings.simplefilter('error', sa.exc.SAWarning)
|
||||
@@ -59,7 +55,6 @@ class TestCase(object):
|
||||
def teardown_method(self, method):
|
||||
aggregates.manager.reset()
|
||||
self.session.close_all()
|
||||
self.connection.queries = []
|
||||
if self.create_tables:
|
||||
self.Base.metadata.drop_all(self.connection)
|
||||
self.connection.close()
|
||||
|
@@ -76,6 +76,5 @@ class TestAggregateManyToManyAndManyToMany(TestCase):
|
||||
catalog2 = self.Catalog(products=products)
|
||||
self.session.add(catalog)
|
||||
self.session.commit()
|
||||
print self.connection.queries[-1]
|
||||
assert catalog.category_count == 1
|
||||
assert catalog2.category_count == 1
|
||||
|
Reference in New Issue
Block a user