Skip to content

Commit

Permalink
Rename testing to verification
Browse files Browse the repository at this point in the history
Don't make nosetests run itself
  • Loading branch information
michaeljoseph committed Oct 24, 2013
1 parent 7d27e37 commit cf36094
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 37 deletions.
4 changes: 2 additions & 2 deletions changes/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from changes.config import arguments
from changes.changelog import changelog
from changes.packaging import install, upload, pypi
from changes.testing import run_tests
from changes.verification import run_tests
from changes.version import bump_version
from changes.vcs import tag, commit_version_change

Expand All @@ -61,7 +61,7 @@ def release():
if not arguments['--skip-changelog']:
changelog()
bump_version()
test()
run_tests()
commit_version_change()
install()
upload()
Expand Down
24 changes: 0 additions & 24 deletions changes/testing.py

This file was deleted.

27 changes: 27 additions & 0 deletions changes/verification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import logging

import sh

from changes import config, shell

log = logging.getLogger(__name__)


def run_tests():
if config.arguments['--tox']:
result = sh.tox()
else:
result = sh.nosetests()

if not result:
raise Exception('Test command failed')
else:
return True


def run_test_command():
if config.arguments['--test-command']:
test_command = config.arguments['--test-command']
result = shell.execute(sh, tuple(test_command.split(' ')))
log.info('Test command "%s", returned %s', test_command, result)
return True
11 changes: 0 additions & 11 deletions tests/test_testing.py

This file was deleted.

0 comments on commit cf36094

Please sign in to comment.