小编A J*_*A J的帖子

运行py.test时获取错误ImportMismatchError

当我在本地运行测试时它的工作正常,但是在创建了docker并在容器内部运行后,我遇到了错误.

    /usr/local/lib/python3.5/site-packages/_pytest/config.py:325: in _getconftestmodules
    return self._path2confmods[path]
E   KeyError: local('/apis/db/tests')

During handling of the above exception, another exception occurred:
/usr/local/lib/python3.5/site-packages/_pytest/config.py:356: in _importconftest
    return self._conftestpath2mod[conftestpath]
E   KeyError: local('/apis/db/tests/conftest.py')

During handling of the above exception, another exception occurred:
/usr/local/lib/python3.5/site-packages/_pytest/config.py:362: in _importconftest
    mod = conftestpath.pyimport()
/usr/local/lib/python3.5/site-packages/py/_path/local.py:680: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)

_pytest.config.ConftestImportFailure: ImportMismatchError('conftest', '/projects/my_project/db/tests/conftest.py', local('/apis/db/tests/conftest.py'))
Run Code Online (Sandbox Code Playgroud)

/ apis - 它是Dockerfile中的WORKDIR.

python pytest docker

58
推荐指数
5
解决办法
1万
查看次数

如何在Android Studio中使用Facebook Buck构建工具?

如何在Android Studio中使用Facebook Buck构建工具?

这个要求类似于android studio中的代码,但是通过命令行中的buck来构建.

android build android-studio buck

9
推荐指数
1
解决办法
3350
查看次数

标签 统计

android ×1

android-studio ×1

buck ×1

build ×1

docker ×1

pytest ×1

python ×1