Ipaddress tests marked as xfailed if ipaddress package not installed
This commit is contained in:
@@ -1,15 +1,17 @@
|
|||||||
|
from pytest import mark
|
||||||
import six
|
import six
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy_utils import IPAddressType
|
from sqlalchemy_utils.types import ip_address
|
||||||
from tests import TestCase
|
from tests import TestCase
|
||||||
|
|
||||||
|
|
||||||
|
@mark.xfail('ip_address.ipaddress is None')
|
||||||
class TestIPAddressType(TestCase):
|
class TestIPAddressType(TestCase):
|
||||||
def create_models(self):
|
def create_models(self):
|
||||||
class Visitor(self.Base):
|
class Visitor(self.Base):
|
||||||
__tablename__ = 'document'
|
__tablename__ = 'document'
|
||||||
id = sa.Column(sa.Integer, primary_key=True)
|
id = sa.Column(sa.Integer, primary_key=True)
|
||||||
ip_address = sa.Column(IPAddressType)
|
ip_address = sa.Column(ip_address.IPAddressType)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'Visitor(%r)' % self.id
|
return 'Visitor(%r)' % self.id
|
||||||
|
Reference in New Issue
Block a user