提交 b8776574 编写于 作者: M Megvii Engine Team

ci(pytest): fixture doctest namespace in pytest config

GitOrigin-RevId: 90ef1924dc69311f0945aa3d03923af968439c6f
上级 ba8bd010
import pytest
import megengine
@pytest.fixture(autouse=True)
def import_megengine_path(doctest_namespace):
doctest_namespace["mge"] = megengine
doctest_namespace["Tensor"] = megengine.Tensor
doctest_namespace["F"] = megengine.functional
doctest_namespace["M"] = megengine.module
doctest_namespace["Q"] = megengine.quantization
doctest_namespace["data"] = megengine.data
doctest_namespace["autodiff"] = megengine.autodiff
doctest_namespace["optim"] = megengine.optimizer
doctest_namespace["jit"] = megengine.jit
doctest_namespace["amp"] = megengine.amp
doctest_namespace["dist"] = megengine.distributed
doctest_namespace["tm"] = megengine.traced_module
doctest_namespace["hub"] = megengine.hub
doctest_namespace["utils"] = megengine.utils
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册