使用testing.mysqld时,没有名为“ testing”的模块

时间:2019-05-14 12:54:51

标签: python python-module

testing.mysqld是用于在单元测试中测试flask_mysqldb的模型

但是安装模块并使用它后,我得到了ModuleNotFoundError: No module named 'testing'

我的脚本中的代码:

import unittest
import testing.mysqld

class TestApp(unittest.TestCase):


    def setUp(self):
        self.mysqld = testing.mysqld.Mysqld(my_cnf={'skip-networking': None})
        self.app = app.test_client()

    def tearDown(self):
        self.mysqld.stop()

我使用mysql8和MacOS,成功安装了pip,并且我的PATH中已经存在MySQL

0 个答案:

没有答案
相关问题