python - 如何解决测试 postgres 包错误
问题描述
我已经尝试了 testing.postgres 上的所有文档资源,但我一直收到同样的错误。错误是:
Traceback (most recent call last):
File "C:\Users\Oloyede Emmanuel\Documents\Hook\tests.py", line 42, in setUp
with testing.postgresql.Postgresql() as postgresql:
File "C:\Users\Oloyede Emmanuel\Documents\Hook\env\lib\site-packages\testing\common\database.py", line 92, in init
self.initialize()
File "C:\Users\Oloyede Emmanuel\Documents\Hook\env\lib\site-packages\testing\postgresql.py", line 50, in initialize
self.initdb = find_program('initdb', ['bin'])
File "C:\Users\Oloyede Emmanuel\Documents\Hook\env\lib\site-packages\testing\postgresql.py", line 144, in find_program
raise RuntimeError("command not found: %s" % name)
RuntimeError: command not found: initdb
解决方案
推荐阅读
- antlr4 - ANTLR 4 错误 50 - 不匹配的字符 'i' 期望 '{'
- azure - Azure ARM 模板:功能限制,如何检测?
- bash - 从单个单元中运行在服务器上的所有 Java 进程中捕获 XMX 值
- reactjs - 无法从 vscode 部署到 heroku react 应用程序
- spring - Spring data JPA - 如何使用投影和/或命名查询返回嵌套映射的 id?
- batch-file - PSEXEC - 不被识别为内部或外部命令
- go - 试图理解 Go 中的“同步”。为什么这行得通?
- image - cloudinary img 格式打破了谷歌页面速度移动
- python - 如何在更改嵌套 json 内容时合并列表中的 dict 元素?
- r - 过滤级别并获取一个值