Skip to content

Commit

Permalink
add some naming tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wlav committed Aug 8, 2017
1 parent 5e59a48 commit e243fd3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_fragile.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,29 @@ def fail_import():

from cppyy.gbl.fragile import nested1
assert cppyy.gbl.fragile.nested1 is nested1
assert nested1.__name__ == 'nested1'
assert nested1.__module__ == 'cppyy.gbl.fragile'

from cppyy.gbl.fragile.nested1 import A, nested2
assert cppyy.gbl.fragile.nested1.A is A
assert A.__name__ == 'A'
assert A.__module__ == 'cppyy.gbl.fragile.nested1'
assert cppyy.gbl.fragile.nested1.nested2 is nested2
assert nested2.__name__ == 'nested2'
assert nested2.__module__ == 'cppyy.gbl.fragile.nested1'

from cppyy.gbl.fragile.nested1.nested2 import A, nested3
assert cppyy.gbl.fragile.nested1.nested2.A is A
assert A.__name__ == 'A'
assert A.__module__ == 'cppyy.gbl.fragile.nested1.nested2'
assert cppyy.gbl.fragile.nested1.nested2.nested3 is nested3
assert nested3.__name__ == 'nested3'
assert nested3.__module__ == 'cppyy.gbl.fragile.nested1.nested2'

from cppyy.gbl.fragile.nested1.nested2.nested3 import A
assert cppyy.gbl.fragile.nested1.nested2.nested3.A is nested3.A
assert A.__name__ == 'A'
assert A.__module__ == 'cppyy.gbl.fragile.nested1.nested2.nested3'

def test13_missing_casts(self):
"""Test proper handling when a hierarchy is not fully available"""
Expand Down

0 comments on commit e243fd3

Please sign in to comment.