From feb919a7b07f6409c2234c9713f10d38def33ec1 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Fri, 26 Jul 2013 00:02:55 -0700 Subject: [PATCH] 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.). --- tests/test_arrow.py | 2 +- tests/test_color.py | 2 +- tests/test_ip_address.py | 2 +- tests/test_password.py | 2 +- tests/test_phonenumber_type.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_arrow.py b/tests/test_arrow.py index 66f8c1c..d68e1b2 100644 --- a/tests/test_arrow.py +++ b/tests/test_arrow.py @@ -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): diff --git a/tests/test_color.py b/tests/test_color.py index 617efdf..59eb512 100644 --- a/tests/test_color.py +++ b/tests/test_color.py @@ -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): diff --git a/tests/test_ip_address.py b/tests/test_ip_address.py index eaf8fa3..da3c13c 100644 --- a/tests/test_ip_address.py +++ b/tests/test_ip_address.py @@ -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): diff --git a/tests/test_password.py b/tests/test_password.py index 5537d72..f212fbd 100644 --- a/tests/test_password.py +++ b/tests/test_password.py @@ -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): diff --git a/tests/test_phonenumber_type.py b/tests/test_phonenumber_type.py index 744a1f5..9650ab1 100644 --- a/tests/test_phonenumber_type.py +++ b/tests/test_phonenumber_type.py @@ -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):