Skip to content

Commit

Permalink
added SKIP_TESTS settings
Browse files Browse the repository at this point in the history
  • Loading branch information
zbyte64 committed Feb 23, 2010
1 parent faf02c9 commit 355ff3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
*~
*.pyc
build/*
dist/*
src/*.egg-info/*
src/*.egg-info/*
12 changes: 11 additions & 1 deletion src/test_extensions/management/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,17 @@ def handle(self, *test_labels, **options):
#print test_runner
# print test_runner.__file__

if hasattr(settings, 'SKIP_TESTS'):
if not test_labels:
test_labels = list()
for app in settings.INSTALLED_APPS:
test_labels.append(app.split('.')[-1])
for app in settings.SKIP_TESTS:
try:
test_labels.remove(app)
except ValueError:
pass
failures = test_runner(test_labels, verbosity=verbosity,
interactive=interactive) # , skip_apps=skippers)
if failures:
sys.exit(failures)
sys.exit(failures)

0 comments on commit 355ff3b

Please sign in to comment.