Skip to content

Commit 9ef28e6

Browse files
committed
tests: Skip SA tests if it isn't installed.
1 parent 25c0e0b commit 9ef28e6

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/test_sqlalchemy.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import unittest
22

3-
import sqlalchemy as sa
3+
from .helpers import config, eq_, skip_test
4+
5+
try:
6+
import sqlalchemy as sa
7+
except ImportError:
8+
skip_test('SQLAlchemy is not available')
49
from sqlalchemy.orm import sessionmaker
510
from sqlalchemy.ext.declarative import declarative_base
611

7-
from .helpers import config, eq_
8-
912
engine = sa.create_engine(
1013
'mssql+pymssql://%s:%s@%s:%s/%s' % (
1114
config.user,

0 commit comments

Comments
 (0)