From 892078fcf0165a005c8e5bc61209641475223bf8 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Fri, 1 May 2015 08:36:53 -0400 Subject: [PATCH] Skip SQLAlchemy tests on marshmallow<2.0 --- test_flask_marshmallow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_flask_marshmallow.py b/test_flask_marshmallow.py index 840e497..b4e986b 100755 --- a/test_flask_marshmallow.py +++ b/test_flask_marshmallow.py @@ -11,7 +11,7 @@ import marshmallow -IS_MARSHMALLOW_2 = int(marshmallow.__version__.split('.')[0]) >= 2 +MARSHMALLOW_2 = int(marshmallow.__version__.split('.')[0]) >= 2 _app = Flask(__name__) @@ -233,6 +233,8 @@ def test_links_within_nested_object(app, mockbook): assert author['links']['self'] == url_for('author', id=mockbook.author.id) assert author['links']['collection'] == url_for('authors') +@pytest.mark.skipif(not MARSHMALLOW_2, reason='marshmallow-sqlalchemy ' + 'not supported in marshmallow<2.0') class TestSQLAlchemy: @pytest.yield_fixture()