Commit 1a949c98 by bmedx

Not quite functional implementation of tox testing

I was able to get all but ~12 tests working locally by upgrading the version of Selenium and geckodriver along with these changes. I'm not sure if the remaining tests are breaking due to the Firefox/Selenium upgrade or something else, but maybe this can be a starting point if someone else wants to pick up the work.
parent a88e37be
...@@ -10,3 +10,4 @@ ...@@ -10,3 +10,4 @@
.idea/* .idea/*
dump.rdb dump.rdb
problem_builder.tests.* problem_builder.tests.*
.tox/
...@@ -3,16 +3,6 @@ machine: ...@@ -3,16 +3,6 @@ machine:
version: 2.7.10 version: 2.7.10
dependencies: dependencies:
override: override:
- "pip install -U pip wheel"
# Temporarily pin setuptools to a specific version.
# See commit message of https://github.com/open-craft/problem-builder/commit/51277a34fb426724616618c1afdb893ab2de4c6b for more info:
- "pip install setuptools==24.3.1"
- "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk"
- "pip install -r requirements.txt"
- "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt"
- "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt"
- "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-*.tar.gz"
- "pip install -r test_requirements.txt"
- "mkdir var" - "mkdir var"
test: test:
override: override:
...@@ -20,7 +10,12 @@ test: ...@@ -20,7 +10,12 @@ test:
parallel: true parallel: true
- "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi": - "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi":
parallel: true parallel: true
- "python run_tests.py": - "tox -e py27-django18":
parallel: true
files:
- "problem_builder/v1/tests/**/*.py"
- "problem_builder/tests/**/*.py"
- "tox -e py27-django111":
parallel: true parallel: true
files: files:
- "problem_builder/v1/tests/**/*.py" - "problem_builder/v1/tests/**/*.py"
......
-e git+https://github.com/edx/XBlock.git@tag-master-2015-05-22#egg=XBlock #selenium==3.5.0
selenium==2.47.3 # 2.48 is not working atm fs<2
xblock>0.5.0
[tox]
envlist = py{27}-django{18,111}
# The ordering of deps and commands here is weird due to the way we install xblock-sdk and associated dependencies.
# Installing test/base.txt inside deps fails, and installing the env-specific Django versions inside deps
# causes Django 1.4 to be installed over it by something later in the process.
[testenv]
passenv = CI TRAVIS TRAVIS_* DISPLAY
deps =
-egit+https://github.com/edx/xblock-sdk.git#egg=xblock-sdk
commands =
pip install -r {envdir}/src/xblock-sdk/requirements/base.txt
pip install -r {envdir}/src/xblock-sdk/requirements/test.txt
pip install -r requirements.txt
pip install -r test_requirements.txt
django18: pip install Django>=1.8,<1.9
django110: pip install Django>=1.10,<1.11
django111: pip install Django>=1.11,<2.0
pip freeze
python ./run_tests.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment