Commit 3392afe9 authored by Robert Bradshaw's avatar Robert Bradshaw

Test for bad cimported module attributes.

parent d17e481c
# mode: error
cimport libcpp
print libcpp.no_such_attribute
cimport libcpp.map
print libcpp.map.no_such_attribute
from libcpp cimport vector
print vector.no_such_attribute
from libcpp cimport vector as my_vector
print my_vector.no_such_attribute
from libcpp cimport vector as my_vector_with_shadow
from libcpp import vector as my_vector_with_shadow
print my_vector_with_shadow.no_such_attribute # OK (if such a module existed at runtime)
_ERRORS = u"""
5:12: cimported module has no attribute 'no_such_attribute'
8:16: cimported module has no attribute 'no_such_attribute'
11:12: cimported module has no attribute 'no_such_attribute'
14:15: cimported module has no attribute 'no_such_attribute'
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment