Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
f50519ae
Commit
f50519ae
authored
Oct 22, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #906 from MITx/victor/test-speedup
Victor/test speedup
parents
9a4e21c0
4bf9323e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
22 deletions
+31
-22
lms/envs/test.py
+24
-22
rakefile
+7
-0
No files found.
lms/envs/test.py
View file @
f50519ae
...
...
@@ -27,12 +27,18 @@ SOUTH_TESTS_MIGRATE = False # To disable migrations and use syncdb instead
# Nose Test Runner
INSTALLED_APPS
+=
(
'django_nose'
,)
NOSE_ARGS
=
[
'--cover-erase'
,
'--with-xunit'
,
'--with-xcoverage'
,
'--cover-html'
,
# '-v', '--pdb', # When really stuck, uncomment to start debugger on error
'--cover-inclusive'
,
'--cover-html-dir'
,
os
.
environ
.
get
(
'NOSE_COVER_HTML_DIR'
,
'cover_html'
)]
for
app
in
os
.
listdir
(
PROJECT_ROOT
/
'djangoapps'
):
NOSE_ARGS
+=
[
'--cover-package'
,
app
]
NOSE_ARGS
=
[]
# Turning off coverage speeds up tests dramatically... until we have better config,
# leave it here for manual fiddling.
_coverage
=
True
if
_coverage
:
NOSE_ARGS
=
[
'--cover-erase'
,
'--with-xunit'
,
'--with-xcoverage'
,
'--cover-html'
,
# '-v', '--pdb', # When really stuck, uncomment to start debugger on error
'--cover-inclusive'
,
'--cover-html-dir'
,
os
.
environ
.
get
(
'NOSE_COVER_HTML_DIR'
,
'cover_html'
)]
for
app
in
os
.
listdir
(
PROJECT_ROOT
/
'djangoapps'
):
NOSE_ARGS
+=
[
'--cover-package'
,
app
]
TEST_RUNNER
=
'django_nose.NoseTestSuiteRunner'
# Local Directories
...
...
@@ -98,22 +104,6 @@ DATABASES = {
'NAME'
:
PROJECT_ROOT
/
"db"
/
"mitx.db"
,
},
# The following are for testing purposes...
'edX/toy/2012_Fall'
:
{
'ENGINE'
:
'django.db.backends.sqlite3'
,
'NAME'
:
ENV_ROOT
/
"db"
/
"course1.db"
,
},
'edx/full/6.002_Spring_2012'
:
{
'ENGINE'
:
'django.db.backends.sqlite3'
,
'NAME'
:
ENV_ROOT
/
"db"
/
"course2.db"
,
},
'edX/toy/TT_2012_Fall'
:
{
'ENGINE'
:
'django.db.backends.sqlite3'
,
'NAME'
:
ENV_ROOT
/
"db"
/
"course3.db"
,
},
}
CACHES
=
{
...
...
@@ -172,3 +162,15 @@ FILE_UPLOAD_HANDLERS = (
'django.core.files.uploadhandler.MemoryFileUploadHandler'
,
'django.core.files.uploadhandler.TemporaryFileUploadHandler'
,
)
################### Make tests faster
#http://slacy.com/blog/2012/04/make-your-tests-faster-in-django-1-4/
PASSWORD_HASHERS
=
(
# 'django.contrib.auth.hashers.PBKDF2PasswordHasher',
# 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
# 'django.contrib.auth.hashers.BCryptPasswordHasher',
'django.contrib.auth.hashers.SHA1PasswordHasher'
,
'django.contrib.auth.hashers.MD5PasswordHasher'
,
# 'django.contrib.auth.hashers.CryptPasswordHasher',
)
rakefile
View file @
f50519ae
...
...
@@ -151,6 +151,13 @@ Dir["common/lib/*"].each do |lib|
sh
(
"nosetests
#{
lib
}
--cover-erase --with-xunit --with-xcoverage --cover-html --cover-inclusive --cover-package
#{
File
.
basename
(
lib
)
}
--cover-html-dir
#{
File
.
join
(
report_dir
,
"cover"
)
}
"
)
end
TEST_TASKS
<<
task_name
desc
"Run tests for common lib
#{
lib
}
(without coverage)"
task
"fasttest_
#{
lib
}
"
do
sh
(
"nosetests
#{
lib
}
"
)
end
end
task
:test
do
...
...
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