Skip to content

Commit 355ff3b

Browse files
committed
added SKIP_TESTS settings
1 parent faf02c9 commit 355ff3b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
2+
*~
23
*.pyc
34
build/*
45
dist/*
5-
src/*.egg-info/*
6+
src/*.egg-info/*

Diff for: src/test_extensions/management/commands/test.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,17 @@ def handle(self, *test_labels, **options):
7979
#print test_runner
8080
# print test_runner.__file__
8181

82+
if hasattr(settings, 'SKIP_TESTS'):
83+
if not test_labels:
84+
test_labels = list()
85+
for app in settings.INSTALLED_APPS:
86+
test_labels.append(app.split('.')[-1])
87+
for app in settings.SKIP_TESTS:
88+
try:
89+
test_labels.remove(app)
90+
except ValueError:
91+
pass
8292
failures = test_runner(test_labels, verbosity=verbosity,
8393
interactive=interactive) # , skip_apps=skippers)
8494
if failures:
85-
sys.exit(failures)
95+
sys.exit(failures)

0 commit comments

Comments
 (0)