-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify test infrastructure & update tests.
Also includes Travis CI integration.
- Loading branch information
Showing
17 changed files
with
115 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
before_install: | ||
- "export DISPLAY=:99" | ||
- "sh -e /etc/init.d/xvfb start" | ||
install: | ||
- "sh install_test_deps.sh" | ||
- "pip uninstall -y xblock-drag-and-drop-v2" | ||
- "python setup.py sdist" | ||
- "pip install dist/xblock-drag-and-drop-v2-0.1.tar.gz" | ||
script: python run_tests.py | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Installs xblock-sdk and dependencies needed to run the tests suite. | ||
# Run this script inside a fresh virtual environment. | ||
pip install -e git://github.com/edx/xblock-sdk.git#egg=xblock-sdk | ||
pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements.txt | ||
pip install -r $VIRTUAL_ENV/src/xblock-sdk/test-requirements.txt | ||
python setup.py develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Run tests for the Drag and Drop V2 XBlock. | ||
This script is required to run our selenium tests inside the xblock-sdk workbench | ||
because the workbench SDK's settings file is not inside any python module. | ||
""" | ||
|
||
import os | ||
import sys | ||
import workbench | ||
|
||
if __name__ == "__main__": | ||
# Find the location of the XBlock SDK. Note: it must be installed in development mode. | ||
# ('python setup.py develop' or 'pip install -e') | ||
xblock_sdk_dir = os.path.dirname(os.path.dirname(workbench.__file__)) | ||
sys.path.append(xblock_sdk_dir) | ||
|
||
# Use the workbench settings file: | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") | ||
# Configure a range of ports in case the default port of 8081 is in use | ||
os.environ.setdefault("DJANGO_LIVE_TEST_SERVER_ADDRESS", "localhost:8081-8099") | ||
|
||
from django.core.management import execute_from_command_line | ||
args = sys.argv[1:] | ||
paths = [arg for arg in args if arg[0] != '-'] | ||
if not paths: | ||
paths = ["tests/"] | ||
options = [arg for arg in args if arg not in paths] | ||
execute_from_command_line([sys.argv[0], "test"] + paths + options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.