tests: importorskip migration tests on "migrate" rather than on Python 3
authorChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 29 Mar 2016 21:24:59 +0000 (14:24 -0700)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 29 Mar 2016 21:27:07 +0000 (14:27 -0700)
Previously we assumed we wouldn't run migration tests if we're on
Python 3, but now that we support sqlalchemy-migrate with Python 3,
switch to checking based on "migrate" importability.

* mediagoblin/tests/test_sql_migrations.py: Update test skipping to
  rely on "migrate" module presence rather than Python 3 check.

mediagoblin/tests/test_sql_migrations.py

index 7e0569adcb349327f8943a9973f2d9fa1230d208..4bdadf1b2f9cd45edfc52c647c283eb1af2b6d03 100644 (file)
@@ -17,7 +17,7 @@
 import six
 import pytest
 
-pytestmark = pytest.mark.skipif(six.PY3, reason='needs sqlalchemy.migrate')
+pytest.importorskip("migrate")
 
 import copy