Change mark from xfail to skipif.
Makes tests a bit faster if requirements are not present as the whole class is skipped (rather than running each test, etc.).
This commit is contained in:
@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import arrow
|
|||||||
from tests import TestCase
|
from tests import TestCase
|
||||||
|
|
||||||
|
|
||||||
@mark.xfail('arrow.arrow is None')
|
@mark.skipif('arrow.arrow is None')
|
||||||
class TestArrowDateTimeType(TestCase):
|
class TestArrowDateTimeType(TestCase):
|
||||||
def create_models(self):
|
def create_models(self):
|
||||||
class Article(self.Base):
|
class Article(self.Base):
|
||||||
|
@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import color
|
|||||||
from tests import TestCase
|
from tests import TestCase
|
||||||
|
|
||||||
|
|
||||||
@mark.xfail('color.colour is None')
|
@mark.skipif('color.colour is None')
|
||||||
class TestColorType(TestCase):
|
class TestColorType(TestCase):
|
||||||
def create_models(self):
|
def create_models(self):
|
||||||
class Document(self.Base):
|
class Document(self.Base):
|
||||||
|
@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import ip_address
|
|||||||
from tests import TestCase
|
from tests import TestCase
|
||||||
|
|
||||||
|
|
||||||
@mark.xfail('ip_address.ipaddress is None')
|
@mark.skipif('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):
|
||||||
|
@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import password
|
|||||||
from sqlalchemy_utils import Password, PasswordType
|
from sqlalchemy_utils import Password, PasswordType
|
||||||
|
|
||||||
|
|
||||||
@mark.xfail('password.passlib is None')
|
@mark.skipif('password.passlib is None')
|
||||||
class TestPasswordType(TestCase):
|
class TestPasswordType(TestCase):
|
||||||
|
|
||||||
def create_models(self):
|
def create_models(self):
|
||||||
|
@@ -5,7 +5,7 @@ from sqlalchemy_utils import PhoneNumberType, PhoneNumber
|
|||||||
from sqlalchemy_utils.types import phone_number
|
from sqlalchemy_utils.types import phone_number
|
||||||
|
|
||||||
|
|
||||||
@mark.xfail('phone_number.phonenumbers is None')
|
@mark.skipif('phone_number.phonenumbers is None')
|
||||||
class TestPhoneNumber(object):
|
class TestPhoneNumber(object):
|
||||||
def setup_method(self, method):
|
def setup_method(self, method):
|
||||||
self.valid_phone_numbers = [
|
self.valid_phone_numbers = [
|
||||||
@@ -49,7 +49,7 @@ class TestPhoneNumber(object):
|
|||||||
assert phone_number.__str__() == phone_number.national.encode('utf-8')
|
assert phone_number.__str__() == phone_number.national.encode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
@mark.xfail('phone_number.phonenumbers is None')
|
@mark.skipif('phone_number.phonenumbers is None')
|
||||||
class TestPhoneNumberType(TestCase):
|
class TestPhoneNumberType(TestCase):
|
||||||
|
|
||||||
def create_models(self):
|
def create_models(self):
|
||||||
|
Reference in New Issue
Block a user