diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-16 18:10:35 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-17 06:35:17 -0500 |
| commit | a00a0f880485e1f122e48e0216d34d08efe199e1 (patch) | |
| tree | 32e3f224efa19f8c08a42a33017626d725e41a79 /tests/runtests.py | |
| parent | 730fb593ad19731e7018dd83236318bfe71de86a (diff) | |
[1.8.x] Fixed #24290 -- Skipped postgres_tests if not running with PostgreSQL.
Backport of 8b39f33d78ce5749f8ca40a7ae6823b5f6c26c09 from master
Diffstat (limited to 'tests/runtests.py')
| -rwxr-xr-x | tests/runtests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index 9e308fe572..a1f918c726 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -85,7 +85,7 @@ def get_test_modules(): os.path.isfile(f) or not os.path.exists(os.path.join(dirpath, f, '__init__.py'))): continue - if not connection.vendor == 'postgresql' and f == 'postgres_tests' or f == 'postgres': + if connection.vendor != 'postgresql' and f == 'postgres_tests': continue modules.append((modpath, f)) return modules @@ -232,6 +232,11 @@ def django_tests(verbosity, interactive, failfast, keepdb, reverse, test_labels, state = setup(verbosity, test_labels) extra_tests = [] + if test_labels and 'postgres_tests' in test_labels and connection.vendor != 'postgres': + if verbosity >= 2: + print("Removed postgres_tests from tests as we're not running with PostgreSQL.") + test_labels.remove('postgres_tests') + # Run the test suite, including the extra validation tests. if not hasattr(settings, 'TEST_RUNNER'): settings.TEST_RUNNER = 'django.test.runner.DiscoverRunner' |
