Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated testing for travis/coveralls

  • Loading branch information...
commit bbb2b983db5cf8e8726cd9cc1de5b69322e8d860 1 parent 3a68890
@codeinthehole codeinthehole authored
View
2  .coveragerc
@@ -0,0 +1,2 @@
+[run]
+source = datacash
View
1  .gitignore
@@ -7,3 +7,4 @@ dist/
.coverage
htmlcov/*
sandbox/public
+.coveralls.yml
View
4 .travis.yml
@@ -3,9 +3,9 @@ python:
- 2.6
- 2.7
install:
- - pip install -r requirements.txt
+ - pip install -r requirements.txt --use-mirrors
- python setup.py develop
script:
- - ./runtests.py
+ - coverage run ./runtests.py
after_success:
- coveralls
View
6 README.rst
@@ -17,6 +17,12 @@ oscar.
.. _`crate.io page`: https://crate.io/packages/django-oscar-datacash/
.. image:: https://secure.travis-ci.org/tangentlabs/django-oscar-datacash.png
+ :alt: Continuous integration
+ :target: http://travis-ci.org/#!/tangentlabs/django-oscar-datacash
+
+.. image:: https://coveralls.io/repos/tangentlabs/django-oscar-datacash/badge.png?branch=master
+ :alt: Coverage
+ :target: https://coveralls.io/r/tangentlabs/django-oscar-datacash
Getting started
===============
View
3  requirements.txt
@@ -4,7 +4,8 @@ mock
PyHamcrest==1.6
django-nose==1.0
pinocchio==0.3.1
-coveralls
+coveralls>=0.1.1
+tox
# Development
Werkzeug==0.6.2
View
8 runtests.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python
import sys
-from coverage import coverage
from optparse import OptionParser
from django.conf import settings
@@ -22,7 +21,7 @@
for key, value in locals().items():
if key.startswith('DATACASH'):
datacash_settings[key] = value
-
+
settings.configure(
DATABASES={
'default': {
@@ -59,15 +58,10 @@ def run_tests(*test_args):
# Run tests
test_runner = NoseTestSuiteRunner(verbosity=1)
- c = coverage(source=['datacash'], omit=['*migrations*', '*tests*'])
- c.start()
num_failures = test_runner.run_tests(test_args)
- c.stop()
if num_failures > 0:
sys.exit(num_failures)
- print "Generating HTML coverage report"
- c.html_report()
def generate_migration():
Please sign in to comment.
Something went wrong with that request. Please try again.