tests: also run wcs tests in python 3 (#38679)
This commit is contained in:
parent
800d9a1c9e
commit
6c7449d49a
|
@ -514,7 +514,7 @@ class WcsFormsOfCategoryCell(WcsCommonCategoryCell, WcsBlurpMixin):
|
|||
form['order'] = manual_order.index(form_reference)
|
||||
except ValueError:
|
||||
form['order'] = 9999
|
||||
extra_context['forms'] = sorted(extra_context['forms'], key=lambda x: x.get('order'))
|
||||
extra_context['forms'] = sorted(extra_context['forms'], key=lambda x: x.get('order', 9999))
|
||||
|
||||
if self.limit:
|
||||
if len(extra_context['forms']) > self.limit:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh -xue
|
||||
|
||||
cd $TOX_WORK_DIR
|
||||
test -d wcs || git clone http://git.entrouvert.org/wcs.git
|
||||
(cd wcs && git pull)
|
||||
rm -rf wcs/tests
|
||||
|
|
|
@ -205,7 +205,7 @@ def setup_module(module):
|
|||
run_wcs_script('create-user', hostname)
|
||||
run_wcs_script('create-data', hostname)
|
||||
|
||||
fd = file(os.path.join(WCS_DIR, hostname, 'site-options.cfg'), 'w')
|
||||
fd = open(os.path.join(WCS_DIR, hostname, 'site-options.cfg'), 'w')
|
||||
fd.write('''[api-secrets]
|
||||
combo = combo
|
||||
''')
|
||||
|
|
10
tox.ini
10
tox.ini
|
@ -5,9 +5,10 @@ envlist = coverage-py2-pylint,py3
|
|||
[testenv]
|
||||
usedevelop = True
|
||||
setenv =
|
||||
py2: WCS_MANAGE=wcs/wcsctl.py
|
||||
WCS_MANAGE={toxworkdir}/wcs/wcsctl.py
|
||||
DJANGO_SETTINGS_MODULE=combo.settings
|
||||
COMBO_SETTINGS_FILE=tests/settings.py
|
||||
TOX_WORK_DIR={toxworkdir}
|
||||
coverage: COVERAGE=--cov-report xml --cov-report html --cov=combo/
|
||||
deps =
|
||||
django>=1.11,<1.12
|
||||
|
@ -26,13 +27,14 @@ deps =
|
|||
django-mellon>=1.13
|
||||
py2: django-jsonfield<1.3
|
||||
py2: quixote<3.0
|
||||
py2: vobject
|
||||
py2: django-ratelimit<3
|
||||
py3: quixote>=3.0
|
||||
vobject
|
||||
django-ratelimit<3
|
||||
git+http://git.entrouvert.org/debian/django-ckeditor.git
|
||||
commands =
|
||||
py2: ./getlasso.sh
|
||||
py3: ./getlasso3.sh
|
||||
py2: ./get_wcs.sh
|
||||
./get_wcs.sh
|
||||
python manage.py compilemessages
|
||||
py.test {env:COVERAGE:} {posargs: --junitxml=junit-{envname}.xml tests/}
|
||||
pylint: ./pylint.sh combo/
|
||||
|
|
Loading…
Reference in New Issue