From 0abb7f3ffd6e3d7d6ba3cc017e37d5a7bc3559a5 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Fri, 16 Oct 2009 13:14:22 +0200 Subject: [PATCH] Fix #418 (wrong error message) --- Cython/Compiler/Symtab.py | 2 +- tests/errors/notcimportedT418.pyx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/errors/notcimportedT418.pyx diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index e661eff1..892e985d 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -499,7 +499,7 @@ class Scope(object): if entry.as_module: scope = entry.as_module else: - error(pos, "'%s' is not a cimported module" % scope.qualified_name) + error(pos, "'%s' is not a cimported module" % '.'.join(path)) return None return scope diff --git a/tests/errors/notcimportedT418.pyx b/tests/errors/notcimportedT418.pyx new file mode 100644 index 00000000..c2dbd0e0 --- /dev/null +++ b/tests/errors/notcimportedT418.pyx @@ -0,0 +1,7 @@ +import somemod.child + +cdef somemod.child.something x + +_ERRORS = u""" +3:5: 'somemod.child' is not a cimported module +""" -- 2.26.2