Made web.py tests optional under python 3.x
This commit is contained in:
parent
9c2803c37b
commit
333a84a858
|
@ -14,6 +14,11 @@ try:
|
|||
except ImportError:
|
||||
collect_ignore.append("tests/transport/gevent")
|
||||
|
||||
try:
|
||||
import web
|
||||
except ImportError:
|
||||
collect_ignore.append("tests/contrib/webpy")
|
||||
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.auth',
|
||||
|
|
14
setup.py
14
setup.py
|
@ -42,11 +42,18 @@ flask_tests_requires = [
|
|||
'Flask-Login>=0.2.0',
|
||||
]
|
||||
|
||||
# If it's python3, remove flask & unittest2
|
||||
webpy_tests_requires = [
|
||||
'paste',
|
||||
'web.py',
|
||||
]
|
||||
|
||||
# If it's python3, remove flask, unittest2 & web.py
|
||||
if sys.version_info[0] == 3:
|
||||
flask_requires = []
|
||||
flask_tests_requires = []
|
||||
unittest2_requires = []
|
||||
webpy_tests_requires = []
|
||||
|
||||
|
||||
tests_require = [
|
||||
'bottle',
|
||||
|
@ -67,9 +74,8 @@ tests_require = [
|
|||
'webob',
|
||||
'webtest',
|
||||
'anyjson',
|
||||
'paste',
|
||||
'web.py'
|
||||
] + flask_requires + flask_tests_requires + unittest2_requires
|
||||
] + (flask_requires + flask_tests_requires + unittest2_requires +
|
||||
webpy_tests_requires)
|
||||
|
||||
|
||||
class PyTest(TestCommand):
|
||||
|
|
Loading…
Reference in New Issue