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:
Ryan Leckey
2013-07-26 00:02:55 -07:00
parent eecdeacecf
commit feb919a7b0
5 changed files with 6 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import arrow
from tests import TestCase
@mark.xfail('arrow.arrow is None')
@mark.skipif('arrow.arrow is None')
class TestArrowDateTimeType(TestCase):
def create_models(self):
class Article(self.Base):

View File

@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import color
from tests import TestCase
@mark.xfail('color.colour is None')
@mark.skipif('color.colour is None')
class TestColorType(TestCase):
def create_models(self):
class Document(self.Base):

View File

@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import ip_address
from tests import TestCase
@mark.xfail('ip_address.ipaddress is None')
@mark.skipif('ip_address.ipaddress is None')
class TestIPAddressType(TestCase):
def create_models(self):
class Visitor(self.Base):

View File

@@ -5,7 +5,7 @@ from sqlalchemy_utils.types import password
from sqlalchemy_utils import Password, PasswordType
@mark.xfail('password.passlib is None')
@mark.skipif('password.passlib is None')
class TestPasswordType(TestCase):
def create_models(self):

View File

@@ -5,7 +5,7 @@ from sqlalchemy_utils import PhoneNumberType, PhoneNumber
from sqlalchemy_utils.types import phone_number
@mark.xfail('phone_number.phonenumbers is None')
@mark.skipif('phone_number.phonenumbers is None')
class TestPhoneNumber(object):
def setup_method(self, method):
self.valid_phone_numbers = [
@@ -49,7 +49,7 @@ class TestPhoneNumber(object):
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):
def create_models(self):