Add __module__ attribute to all pybind11 builtin types (#729)

Fixes #728.
This commit is contained in:
Dean Moldovan
2017-03-15 15:38:14 +01:00
committed by GitHub
parent 9f383a542e
commit 1769ea427f
2 changed files with 14 additions and 0 deletions

View File

@@ -52,3 +52,11 @@ def test_importing():
assert OD is OrderedDict
assert str(OD([(1, 'a'), (2, 'b')])) == "OrderedDict([(1, 'a'), (2, 'b')])"
def test_pydoc():
"""Pydoc needs to be able to provide help() for everything inside a pybind11 module"""
import pybind11_tests
import pydoc
assert pydoc.text.docmodule(pybind11_tests)