test: skip some tests for nodb scenario
This commit is contained in:
parent
b5884ff6ca
commit
8068c26327
|
@ -119,8 +119,12 @@ class TestAppHandler(TestCase):
|
|||
|
||||
def test_get_distribution(self):
|
||||
|
||||
try:
|
||||
from sqlalchemy.orm import Query
|
||||
except ImportError:
|
||||
pytest.skip("test is not relevant without sqlalchemy")
|
||||
|
||||
# works with "non-native" objects
|
||||
from sqlalchemy.orm import Query
|
||||
query = Query({})
|
||||
dist = self.app.get_distribution(query)
|
||||
self.assertEqual(dist, 'SQLAlchemy')
|
||||
|
@ -192,8 +196,12 @@ class TestAppHandler(TestCase):
|
|||
def test_get_version(self):
|
||||
from importlib.metadata import version
|
||||
|
||||
try:
|
||||
from sqlalchemy.orm import Query
|
||||
except ImportError:
|
||||
pytest.skip("test is not relevant without sqlalchemy")
|
||||
|
||||
# works with "non-native" objects
|
||||
from sqlalchemy.orm import Query
|
||||
query = Query({})
|
||||
ver = self.app.get_version(obj=query)
|
||||
self.assertEqual(ver, version('SQLAlchemy'))
|
||||
|
|
Loading…
Reference in a new issue