From 340dbd62e2679824da77a800d4d25e6112fa244a Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Tue, 12 Feb 2013 13:46:13 +0400 Subject: [PATCH] TeamcityTestRunner is now new-style class (it's possible that user defined old-style suite runner in settings instead of DjangoTestSuiteRunner) fixed PY-8821 can't run unit tests with pycharm 2.7 --- python/helpers/pycharm/django_test_runner.py | 1 + python/helpers/pycharm/tcunittest.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python/helpers/pycharm/django_test_runner.py b/python/helpers/pycharm/django_test_runner.py index c25f827372ff..6e1d94cf4ea2 100644 --- a/python/helpers/pycharm/django_test_runner.py +++ b/python/helpers/pycharm/django_test_runner.py @@ -35,6 +35,7 @@ try: BaseSuiteRunner.__init__(self) except ImportError: + # for Django <= 1.1 compatibility class BaseRunner(TeamcityTestRunner): def __init__(self, stream=sys.stdout, **options): TeamcityTestRunner.__init__(self, stream) diff --git a/python/helpers/pycharm/tcunittest.py b/python/helpers/pycharm/tcunittest.py index 8e8a5c496116..c2b5ecdc3bcb 100644 --- a/python/helpers/pycharm/tcunittest.py +++ b/python/helpers/pycharm/tcunittest.py @@ -184,7 +184,7 @@ class TeamcityTestResult(TestResult): # do not use text.decode('string_escape'), it leads to problems with different string encodings given return text.replace("\\n", "\n") -class TeamcityTestRunner: +class TeamcityTestRunner(object): def __init__(self, stream=sys.stdout): self.stream = stream