Use the django-nose test runner, for the coverage features
This commit is contained in:
@@ -8,6 +8,7 @@ sessions. Assumes structure:
|
|||||||
/log # Where we're going to write log files
|
/log # Where we're going to write log files
|
||||||
"""
|
"""
|
||||||
from common import *
|
from common import *
|
||||||
|
import os
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
app
|
app
|
||||||
@@ -16,6 +17,14 @@ INSTALLED_APPS = [
|
|||||||
if not app.startswith('askbot')
|
if not app.startswith('askbot')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Nose Test Runner
|
||||||
|
INSTALLED_APPS += ['django_nose']
|
||||||
|
NOSE_ARGS = ['--cover-erase', '--with-xunit', '--with-xcoverage', '--cover-html', '--cover-inclusive']
|
||||||
|
for app in os.listdir(PROJECT_ROOT / 'djangoapps'):
|
||||||
|
NOSE_ARGS += ['--cover-package', app]
|
||||||
|
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
|
||||||
|
|
||||||
|
# Local Directories
|
||||||
COURSES_ROOT = PROJECT_ROOT / "test_data"
|
COURSES_ROOT = PROJECT_ROOT / "test_data"
|
||||||
DATA_DIR = COURSES_ROOT
|
DATA_DIR = COURSES_ROOT
|
||||||
MAKO_TEMPLATES['course'] = [DATA_DIR]
|
MAKO_TEMPLATES['course'] = [DATA_DIR]
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ django-masquerade
|
|||||||
fs
|
fs
|
||||||
django-jasmine
|
django-jasmine
|
||||||
beautifulsoup
|
beautifulsoup
|
||||||
requests
|
requests
|
||||||
|
|||||||
3
test-requirements.txt
Normal file
3
test-requirements.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
django-nose
|
||||||
|
coverage
|
||||||
|
nosexcover
|
||||||
28
test_data/course_settings.py
Normal file
28
test_data/course_settings.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
GRADER = [
|
||||||
|
{
|
||||||
|
'type' : "Homework",
|
||||||
|
'min_count' : 12,
|
||||||
|
'drop_count' : 2,
|
||||||
|
'short_label' : "HW",
|
||||||
|
'weight' : 0.15,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'type' : "Lab",
|
||||||
|
'min_count' : 12,
|
||||||
|
'drop_count' : 2,
|
||||||
|
'category' : "Labs",
|
||||||
|
'weight' : 0.15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'type' : "Midterm",
|
||||||
|
'name' : "Midterm Exam",
|
||||||
|
'short_label' : "Midterm",
|
||||||
|
'weight' : 0.3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'type' : "Final",
|
||||||
|
'name' : "Final Exam",
|
||||||
|
'short_label' : "Final",
|
||||||
|
'weight' : 0.4,
|
||||||
|
}
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user