Python LiveServerTestCase慢

Python LiveServerTestCase慢,python,django,performance,testing,Python,Django,Performance,Testing,大约4次中有1次,当我尝试运行功能测试时,我必须等待大约20分钟才能开始测试: python manage.py test Using existing test database for alias 'default'... 当我运行单元测试时,这个问题不会发生 即使我尝试运行以下简单测试: class FrontTest(LiveServerTestCase): @classmethod def setUpClass(self): supe

大约4次中有1次,当我尝试运行功能测试时,我必须等待大约20分钟才能开始测试:

python manage.py test
Using existing test database for alias 'default'...
当我运行单元测试时,这个问题不会发生

即使我尝试运行以下简单测试:

class FrontTest(LiveServerTestCase):

        @classmethod
        def setUpClass(self):
        super(FrontTest,self).setUpClass()

        @classmethod
        def tearDownClass(self):
        super(FrontTest, self).tearDownClass()

        def test_stupid(self):
            print('hello world')

这个问题曾经发生在你身上吗?

关于LiveServerTestCase的相关问题有很多帖子,内容可能会非常广泛。数据库、HTTPS等。到目前为止,您尝试了什么?事实上,如果您有关于HTTPS的链接,我尝试了很多东西,但从未听说过。奇怪的是,问题并非总是发生。