Further fixes when using type() when using -builtin to include module name
Using type() on a builtin type should include the package and module name, see http://docs.python.org/2/c-api/typeobj.html
This commit is contained in:
parent
d8bfe00e25
commit
4fb940d913
5 changed files with 23 additions and 2 deletions
|
|
@ -4,4 +4,6 @@ import pkg2.foo
|
|||
print " Finished importing pkg2.foo"
|
||||
|
||||
var2 = pkg2.foo.Pkg2_Foo()
|
||||
if str(type(var2)).find("'pkg2.foo.Pkg2_Foo'") == -1:
|
||||
raise RuntimeError("failed type checking: " + str(type(var2)))
|
||||
print " Successfully created object pkg2.foo.Pkg2_Foo"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import pkg1.pkg2.foo
|
||||
print " Finished importing pkg1.pkg2.foo"
|
||||
|
||||
var2 = pkg1.pkg2.foo.Pkg2_Foo();
|
||||
if str(type(var2)).find("'pkg1.pkg2.foo.Pkg2_Foo'") == -1:
|
||||
raise RuntimeError("failed type checking: " + str(type(var2)))
|
||||
print " Successfully created object pkg1.pkg2.foo.Pkg2_Foo"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue