test_modules.py (11986:c12e4625ab56) test_modules.py (12037:d28054ac6ec9)
1
2def test_nested_modules():
3 import pybind11_tests
4 from pybind11_tests.submodule import submodule_func
5
6 assert pybind11_tests.__name__ == "pybind11_tests"
7 assert pybind11_tests.submodule.__name__ == "pybind11_tests.submodule"
8

--- 38 unchanged lines hidden (view full) ---

47
48
49def test_importing():
50 from pybind11_tests import OD
51 from collections import OrderedDict
52
53 assert OD is OrderedDict
54 assert str(OD([(1, 'a'), (2, 'b')])) == "OrderedDict([(1, 'a'), (2, 'b')])"
1
2def test_nested_modules():
3 import pybind11_tests
4 from pybind11_tests.submodule import submodule_func
5
6 assert pybind11_tests.__name__ == "pybind11_tests"
7 assert pybind11_tests.submodule.__name__ == "pybind11_tests.submodule"
8

--- 38 unchanged lines hidden (view full) ---

47
48
49def test_importing():
50 from pybind11_tests import OD
51 from collections import OrderedDict
52
53 assert OD is OrderedDict
54 assert str(OD([(1, 'a'), (2, 'b')])) == "OrderedDict([(1, 'a'), (2, 'b')])"
55
56
57def test_pydoc():
58 """Pydoc needs to be able to provide help() for everything inside a pybind11 module"""
59 import pybind11_tests
60 import pydoc
61
62 assert pydoc.text.docmodule(pybind11_tests)