Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

"Merge pull request #89 from tflink/master\n\nMove check for flask-sc…

…ript before importing ManageAssets"
  • Loading branch information...
commit 63cca49feda68a36d31f8115ebbe5dda67b986cc 2 parents 018296e + 406c0ac
Michael Elsdörfer authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 tests/test_script.py
14 tests/test_script.py
View
@@ -1,7 +1,14 @@
from __future__ import absolute_import
-import sys
from nose import SkipTest
+
+# check for flask-script before importing things that fail if it's not present
+try:
+ from flask.ext.script import Manager
+except:
+ raise SkipTest()
+
+import sys
from flask import Flask
from flask.ext.assets import Environment, ManageAssets
from webassets.script import GenericArgparseImplementation
@@ -11,11 +18,6 @@
if sys.version_info[:2] == (2, 6):
raise SkipTest()
-try:
- from flask.ext.script import Manager
-except:
- raise SkipTest()
-
# The CLI likes to log to stderr, which isn't nice to the test output.
import logging
Please sign in to comment.
Something went wrong with that request. Please try again.