Commit 17e4a8f8 by Clinton Blackburn

Updated Coverage Usage

This instantiation of coverage ensures coverage is loaded before any code being tested. This eliminates the need for to instruct coverage to omit numerous files, and ensures coverage reporting is accurate.
parent 4c7bf1a1
[run] [run]
data_file = .coverage data_file = .coverage
omit = ecommerce/settings* omit = ecommerce/settings*
# Custom code in the user app is covered, but something about the way Django 1.7 ecommerce/conf*
# loads models causes the rest of the app to appear uncovered. The result is
# skewed coverage stats, which is why the app is omitted from coverage reports.
ecommerce/user*
# Custom code in the order models app is covered, but the same issue described
# above causes all other code in the model to appear uncovered, resulting in
# skewed coverage stats.
ecommerce/extensions/order/models*
ecommerce/extensions/payment/constants*
ecommerce/extensions/payment/models*
ecommerce/extensions/refund/exceptions*
ecommerce/extensions/refund/models*
ecommerce/extensions/refund/status*
# The fulfillment app's status module only contains constants, which don't require
# test coverage.
ecommerce/extensions/fulfillment/status.py
# These files are loaded before coverage, thus they are falsely marked as not covered.
ecommerce/extensions/checkout/apps.py
ecommerce/extensions/checkout/signals.py
ecommerce/extensions/fulfillment/apps.py
ecommerce/extensions/fulfillment/signals.py
*wsgi.py *wsgi.py
*migrations* *migrations*
*admin.py *admin.py
*test* *test*
*static* *static*
*conf*
*templates* *templates*
...@@ -35,8 +35,9 @@ clean: ...@@ -35,8 +35,9 @@ clean:
coverage erase coverage erase
test_python: clean test_python: clean
DISABLE_MIGRATIONS=True python manage.py test ecommerce --settings=ecommerce.settings.test --with-coverage \ DISABLE_MIGRATIONS=True coverage run --branch --source=ecommerce ./manage.py test ecommerce \
--cover-package=ecommerce --with-ignore-docstrings --settings=ecommerce.settings.test --with-ignore-docstrings
coverage report
quality: quality:
pep8 --config=.pep8 ecommerce acceptance_tests pep8 --config=.pep8 ecommerce acceptance_tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment