Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

Commit

Permalink
Add coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Sep 28, 2013
1 parent 6424e5d commit 728cf03
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Expand Up @@ -8,10 +8,15 @@ python:
- 2.6

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -r requirements.txt
install:
- pip install -r djangocms_export_objects/tests/requirements.txt
- pip install python-coveralls coverage

# command to run tests, e.g. python setup.py test
script: python setup.py test
script: coverage run --rcfile=coverage.rc setup.py test

after_success:
coveralls --config_file=coverage.rc

matrix:
allow_failures:
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Expand Up @@ -3,14 +3,16 @@ django CMS Export Objects
===============================

.. image:: https://badge.fury.io/py/djangocms-export-objects.png
:target: http://badge.fury.io/py/djangocms-export-object
:target: http://badge.fury.io/py/djangocms-export-object

.. image:: https://travis-ci.org/nephila/djangocms-export-objects.png?branch=master
:target: https://travis-ci.org/nephila/djangocms-export-objects

.. image:: https://pypip.in/d/djangocms-export-objects/badge.png
:target: https://crate.io/packages/djangocms-export-objects?version=latest

.. image:: https://coveralls.io/repos/nephila/djangocms-export-objects/badge.png
:target: https://coveralls.io/r/nephila/djangocms-export-objects

A django CMS command to export cMS Pages and PlaceholderFields-enabled objects
and all their dependencies.
Expand Down
15 changes: 15 additions & 0 deletions coverage.rc
@@ -0,0 +1,15 @@
[run]
source = djangocms_export_objects
branch = True
omit =
djangocms_export_objects/tests/*
djangocms_export_objects/__init__.py
djangocms_export_objects/models.py

[report]
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.:
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -22,6 +22,7 @@
# Add Python 2.6-specific dependencies
if sys.version_info[:2] < (2, 7):
requirements.append('argparse')
requirements.append('ordereddict')
test_requirements.append('unittest2')

setup(
Expand Down
16 changes: 14 additions & 2 deletions tox.ini
Expand Up @@ -8,9 +8,21 @@ commands = python setup.py test
deps =
-r{toxinidir}/djangocms_export_objects/tests/requirements.txt


[testenv:py26]
deps =
-r{toxinidir}/djangocms_export_objects/tests/requirements.txt
argparse
unittest2
unittest2
ordereddict

[testenv:coverage]
commands =
coverage run --rcfile=coverage.rc setup.py test
coverage report --rcfile=coverage.rc -m

deps =
-r{toxinidir}/djangocms_export_objects/tests/requirements.txt
argparse
unittest2
coverage
python-coveralls

0 comments on commit 728cf03

Please sign in to comment.