summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorda-woods <dw-git@d-woods.co.uk>2023-03-27 07:58:21 +0100
committerGitHub <noreply@github.com>2023-03-27 08:58:21 +0200
commit79b045108742248f4d785352349bb63dc668aee2 (patch)
treef6af8977368d65e9576294035061ec112af90c19 /tests
parentfdd604a8ab5b7070c0c95a79442b09bf02a6ea1d (diff)
downloadcython-79b045108742248f4d785352349bb63dc668aee2.tar.gz
Improve error message for 'cimport cython.floating' (GH-5295)
Tries to provide some helpful hints for https://github.com/cython/cython/issues/5288 where people may be trying to cimport directives/types as if they were a module.
Diffstat (limited to 'tests')
-rw-r--r--tests/errors/e_invalid_special_cython_modules.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/errors/e_invalid_special_cython_modules.py b/tests/errors/e_invalid_special_cython_modules.py
index 950df5c1c..266b04686 100644
--- a/tests/errors/e_invalid_special_cython_modules.py
+++ b/tests/errors/e_invalid_special_cython_modules.py
@@ -15,6 +15,8 @@ import cython.paralel
import cython.parrallel
import cython.dataclass
+import cython.floating
+import cython.cfunc
# ok
from cython.cimports.libc import math
@@ -39,4 +41,6 @@ _ERRORS = """
14:7: 'cython.paralel' is not a valid cython.* module. Did you mean 'cython.parallel' ?
15:7: 'cython.parrallel' is not a valid cython.* module. Did you mean 'cython.parallel' ?
17:7: 'cython.dataclass' is not a valid cython.* module. Did you mean 'cython.dataclasses' ?
+18:7: 'cython.floating' is not a valid cython.* module. Instead, use 'import cython' and then 'cython.floating'.
+19:7: 'cython.cfunc' is not a valid cython.* module. Instead, use 'import cython' and then 'cython.cfunc'.
"""