Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-utils
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
xblock-utils
Commits
f0ac0aca
Commit
f0ac0aca
authored
Mar 18, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test runner script and support for Travis CI
parent
34036b57
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
3 deletions
+73
-3
.gitignore
+3
-0
.travis.yml
+20
-0
README.rst
+1
-1
pylintrc
+25
-0
requirements.txt
+1
-1
run_tests.py
+22
-0
xblockutils/resources.py
+1
-1
No files found.
.gitignore
View file @
f0ac0aca
*.log
*.pyc
.coverage
xblock_utils.egg-info
tests.integration.*.png
.travis.yml
0 → 100644
View file @
f0ac0aca
language
:
python
python
:
-
"
2.7"
before_install
:
-
"
export
DISPLAY=:99"
-
"
sh
-e
/etc/init.d/xvfb
start"
install
:
-
"
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"
-
"
pip
install
-r
requirements.txt"
script
:
-
pep8 xblockutils --max-line-length=120
-
pylint xblockutils
-
python run_tests.py --with-coverage --cover-package=xblockutils
notifications
:
email
:
false
branches
:
only
:
-
master
README.rst
View file @
f0ac0aca
...
...
@@ -10,4 +10,4 @@ test base classes and documentation shared by many XBlocks.
To test the utilities, run::
nosetests --with-coverage --cover-package xblockutils --cover-html
./run_tests.py
pylintrc
0 → 100644
View file @
f0ac0aca
[REPORTS]
reports=no
[FORMAT]
max-line-length=120
[MESSAGES CONTROL]
disable=
abstract-class-not-used,
broad-except,
fixme,
invalid-name,
locally-disabled,
maybe-no-member,
protected-access,
star-args,
too-few-public-methods,
too-many-public-methods,
too-many-ancestors,
too-many-arguments,
too-many-locals,
unused-argument
[SIMILARITIES]
min-similarity-lines=8
requirements.txt
View file @
f0ac0aca
...
...
@@ -3,5 +3,5 @@
# XBlock
# This is not in/from PyPi, since it moves fast
-e git+https://github.com/edx/XBlock.git@
f0e53538be7ce90584a03cc7dd3f06bd43e12ac2
#egg=XBlock
-e git+https://github.com/edx/XBlock.git@
8e496cff186ed33cf92964faab13ccb3691ee211
#egg=XBlock
run_tests.py
0 → 100755
View file @
f0ac0aca
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Run tests for XBlock-utils
"""
import
os
import
sys
if
__name__
==
"__main__"
:
# Use the workbench settings file:
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
"workbench.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
)
xblockutils/resources.py
View file @
f0ac0aca
...
...
@@ -67,7 +67,7 @@ class ResourceLoader(object):
scenarios
=
[]
if
os
.
path
.
isdir
(
scenario_dir
):
for
template
in
os
.
listdir
(
scenario_dir
):
for
template
in
sorted
(
os
.
listdir
(
scenario_dir
)
):
if
not
template
.
endswith
(
'.xml'
):
continue
identifier
=
template
[:
-
4
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment