diff --git a/python/helpers/pycharm/django_test_manage.py b/python/helpers/pycharm/django_test_manage.py index b03a2461cd11..528109c12a3c 100644 --- a/python/helpers/pycharm/django_test_manage.py +++ b/python/helpers/pycharm/django_test_manage.py @@ -5,7 +5,6 @@ import sys from django.core.management import ManagementUtility -from django_test_runner import is_nosetest from pycharm_run_utils import import_system_module from teamcity import teamcity_presence_env_var @@ -108,6 +107,7 @@ class PycharmTestManagementUtility(ManagementUtility): ManagementUtility.__init__(self, argv) def execute(self): + from django_test_runner import is_nosetest if is_nosetest(settings) and "_JB_USE_OLD_RUNNERS" not in os.environ: # New way to run django-nose is to install teamcity-runners plugin # there is no easy way to get qname in 2.7 so string is used