首页 > 解决方案 > 如何解决测试 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

标签: pythonpostgresqltestingflask

解决方案


推荐阅读