From 6f783feb5f2c5cd2d9bd15f9b3c3e8ad67eb0b4a Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Thu, 6 Feb 2014 19:06:33 +0400 Subject: [PATCH] fixed PY-12052 Can't run django tests with nosetests because of `nose_utils` not found. --- python/helpers/pycharm/django_test_runner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/helpers/pycharm/django_test_runner.py b/python/helpers/pycharm/django_test_runner.py index ed5fd0947a03..ebdaf099b82b 100644 --- a/python/helpers/pycharm/django_test_runner.py +++ b/python/helpers/pycharm/django_test_runner.py @@ -2,13 +2,13 @@ from tcunittest import TeamcityTestRunner, TeamcityTestResult from tcmessages import TeamcityServiceMessages import sys from pycharm_run_utils import adjust_django_sys_path +if hasattr(settings, "TEST_RUNNER") and "NoseTestSuiteRunner" in settings.TEST_RUNNER: + from nose_utils import TeamcityNoseRunner + adjust_django_sys_path() from django.conf import settings -if hasattr(settings, "TEST_RUNNER") and "NoseTestSuiteRunner" in settings.TEST_RUNNER: - from nose_utils import TeamcityNoseRunner - from django.test.testcases import TestCase from django import VERSION try: