Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
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
ecommerce
Commits
34a2809d
Commit
34a2809d
authored
Aug 02, 2015
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option to run Python unit tests in parallel
parent
bbba590c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
Makefile
+9
-4
ecommerce/extensions/dashboard/orders/tests.py
+6
-0
ecommerce/extensions/dashboard/refunds/tests/test_acceptance.py
+5
-0
No files found.
Makefile
View file @
34a2809d
...
...
@@ -9,7 +9,9 @@ help:
@
echo
' make migrate apply migrations '
@
echo
' make serve start the dev server at localhost:8002 '
@
echo
' make clean delete generated byte code and coverage reports'
@
echo
' make test_python run unit tests with migrations disabled '
@
echo
' make test_javascript run javascript unit tests '
@
echo
' make test_python run Python unit tests with migrations disabled '
@
echo
' make fast_test_python run Python unit tests in parallel '
@
echo
' make quality run pep8 and pylint '
@
echo
' make validate run unit tests, followed by quality checks '
@
echo
' make html_coverage generate and view HTML coverage report '
...
...
@@ -20,7 +22,6 @@ help:
@
echo
' make fake_translations install fake translations '
@
echo
' make pull_translations pull translations from Transifex '
@
echo
' make update_translations install new translations from Transifex '
@
echo
' make test_javascript run javascript unit tests '
@
echo
' '
requirements.js
:
...
...
@@ -46,11 +47,16 @@ test_javascript:
gulp
test
test_python
:
clean
python manage.py compress
--settings
=
ecommerce.settings.test
python manage.py compress
--settings
=
ecommerce.settings.test
-v0
DISABLE_MIGRATIONS
=
True coverage run
--branch
--source
=
ecommerce ./manage.py
test
ecommerce
\
--settings
=
ecommerce.settings.test
--with-ignore-docstrings
--logging-level
=
DEBUG
coverage report
fast_test_python
:
clean
python manage.py compress
--settings
=
ecommerce.settings.test
-v0
DISABLE_MIGRATIONS
=
True
DISABLE_ACCEPTANCE_TESTS
=
True ./manage.py
test
ecommerce
\
--settings
=
ecommerce.settings.test
--processes
=
4
--with-ignore-docstrings
--logging-level
=
DEBUG
quality
:
pep8
--config
=
.pep8 ecommerce acceptance_tests
pylint
--rcfile
=
pylintrc ecommerce acceptance_tests
...
...
@@ -62,7 +68,6 @@ static:
python manage.py collectstatic
--noinput
-v0
python manage.py compress
-v0
html_coverage
:
coverage html
&&
open htmlcov/index.html
...
...
ecommerce/extensions/dashboard/orders/tests.py
View file @
34a2809d
import
os
from
django.contrib.messages
import
constants
as
MSG
from
django.core.urlresolvers
import
reverse
from
django.test
import
TestCase
,
LiveServerTestCase
,
override_settings
from
nose.plugins.skip
import
SkipTest
from
oscar.core.loading
import
get_model
from
oscar.test
import
factories
from
selenium.common.exceptions
import
NoSuchElementException
...
...
@@ -37,6 +40,9 @@ class OrderListViewTests(OrderViewTestsMixin, RefundTestMixin, LiveServerTestCas
@classmethod
def
setUpClass
(
cls
):
if
os
.
environ
.
get
(
'DISABLE_ACCEPTANCE_TESTS'
)
==
'True'
:
raise
SkipTest
cls
.
selenium
=
WebDriver
()
super
(
OrderListViewTests
,
cls
)
.
setUpClass
()
...
...
ecommerce/extensions/dashboard/refunds/tests/test_acceptance.py
View file @
34a2809d
import
os
from
unittest
import
skip
import
ddt
from
django.core.urlresolvers
import
reverse
from
django.test
import
LiveServerTestCase
from
nose.plugins.skip
import
SkipTest
from
oscar.core.loading
import
get_model
from
oscar.test
import
factories
from
selenium.common.exceptions
import
NoSuchElementException
...
...
@@ -24,6 +26,9 @@ ALL_REFUND_STATUSES = (
class
RefundAcceptanceTestMixin
(
RefundTestMixin
):
@classmethod
def
setUpClass
(
cls
):
if
os
.
environ
.
get
(
'DISABLE_ACCEPTANCE_TESTS'
)
==
'True'
:
raise
SkipTest
cls
.
selenium
=
WebDriver
()
super
(
RefundAcceptanceTestMixin
,
cls
)
.
setUpClass
()
...
...
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