Python金字塔i18n和pytest

问题描述

我跟随pyramid i18nlocale下将翻译添加到我的应用程序中,效果很好,但是pytest一点都不高兴-我遇到这样的错误

    def _isdir(self,path):
>       raise NotImplementedError(
            "Can't perform this operation for unregistered loader type"
        )
E       pyramid.exceptions.ConfigurationExecutionError: <class 'NotImplementedError'>: Can't perform this operation for unregistered loader 

app/__init__.py使用config.add_translation_dirs('app:locale/')添加翻译

pytest.ini

[pytest]
testpaths = tests
python_files = *.py
addopts = -p no:warning

结构是

app/
tests/
setup.py
pytest.ini
...

谢谢

PS:如果添加变形平移,我会发现相同的问题

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)