mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
Switch to DiscoverRunner from DjangoTestSuiteRunner
(imported from commit 77dd694b20509bfdc7327186e0524d686f0415f7)
This commit is contained in:
@@ -145,8 +145,6 @@ def check_pyflakes():
|
||||
'redefinition of unused' in ln or
|
||||
("zerver/models.py" in ln and
|
||||
" undefined name 'bugdown'" in ln) or
|
||||
("zerver/tests.py" in ln and
|
||||
" unable to detect undefined names" in ln) or
|
||||
("zerver/lib/tornado_ioloop_logging.py" in ln and
|
||||
"redefinition of function 'instrument_tornado_ioloop'" in ln) or
|
||||
("zephyr_mirror_backend.py:" in ln and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from django.test.simple import DjangoTestSuiteRunner
|
||||
from django.test.runner import DiscoverRunner
|
||||
|
||||
from zerver.lib.cache import bounce_key_prefix_for_testing
|
||||
|
||||
@@ -72,11 +72,11 @@ def run_test(test):
|
||||
|
||||
test._post_teardown()
|
||||
|
||||
class Runner(DjangoTestSuiteRunner):
|
||||
class Runner(DiscoverRunner):
|
||||
option_list = ()
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
DjangoTestSuiteRunner.__init__(self, *args, **kwargs)
|
||||
DiscoverRunner.__init__(self, *args, **kwargs)
|
||||
|
||||
def run_suite(self, suite):
|
||||
for test in suite:
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
# This is less than ideal, but I couldn't figure out Django's extremely
|
||||
# opaque test runner. We want to split out tests into different files,
|
||||
# but it would be even better if we could run the files individually.
|
||||
from zerver.test_hooks import * # noqa
|
||||
|
||||
from django.test import TestCase
|
||||
from django.utils.timezone import now
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
Reference in New Issue
Block a user