Skip to content

Commit

Permalink
Merge branch 'master' of github.com:colab/colab
Browse files Browse the repository at this point in the history
  • Loading branch information
seocam committed Dec 9, 2015
2 parents a4d38c8 + 0e0a11c commit ce297d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
long_description=open('README.rst').read(),
install_requires=REQUIREMENTS,
tests_require=TEST_REQUIREMENTS,
test_suite="tests.run.run_with_coverage",
test_suite="tests.run.runtests",
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
Expand Down
19 changes: 9 additions & 10 deletions tests/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@
os.environ['COLAB_WIDGETS'] = 'tests/widgets.d'
os.environ['COVERAGE_PROCESS_START'] = '.coveragerc'


import django
import coverage

# Needs to come before the settings import, because some settings instantiate
# objetcs. If they are executed before the coverage startup, those lines
# won't be covered.
if os.path.exists('.coverage'):
os.remove('.coverage')
coverage.process_startup()

import django
from django.conf import settings
from django.test.utils import get_runner
import colab.settings
Expand All @@ -29,13 +35,6 @@ def runtests(test_suites=[]):
sys.exit(failures)


def run_with_coverage(test_suites=[]):
if os.path.exists('.coverage'):
os.remove('.coverage')
coverage.process_startup()
runtests(test_suites)


if __name__ == '__main__':
all_valid_apps = True

Expand All @@ -46,4 +45,4 @@ def run_with_coverage(test_suites=[]):
all_valid_apps = False

if all_valid_apps:
run_with_coverage(sys.argv[1:])
runtests(sys.argv[1:])

0 comments on commit ce297d4

Please sign in to comment.