Skip to content

Commit

Permalink
testing proper setting of __cppname__
Browse files Browse the repository at this point in the history
  • Loading branch information
wlav committed Aug 8, 2017
1 parent e243fd3 commit fe4e96e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_fragile.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,22 +248,27 @@ def fail_import():
assert cppyy.gbl.fragile.nested1.A is A
assert A.__name__ == 'A'
assert A.__module__ == 'cppyy.gbl.fragile.nested1'
assert A.__cppname__ == 'fragile::nested1::A'
assert cppyy.gbl.fragile.nested1.nested2 is nested2
assert nested2.__name__ == 'nested2'
assert nested2.__module__ == 'cppyy.gbl.fragile.nested1'
assert nested2.__cppname__ == 'fragile::nested1::nested2'

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 A.__cppname__ == 'fragile::nested1::nested2::A'
assert cppyy.gbl.fragile.nested1.nested2.nested3 is nested3
assert nested3.__name__ == 'nested3'
assert nested3.__module__ == 'cppyy.gbl.fragile.nested1.nested2'
assert nested3.__cppname__ == 'fragile::nested1::nested2::nested3'

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'
assert A.__cppname__ == 'fragile::nested1::nested2::nested3::A'

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

0 comments on commit fe4e96e

Please sign in to comment.