| 1 |
CYTHONIZE -i -3 not_annotated.pyx |
| 2 |
PYTHON -c "import not_annotated; not_annotated.check()" |
| 3 |
CYTHONIZE -i -3 --annotate default_annotated.pyx |
| 4 |
PYTHON -c "import default_annotated; default_annotated.check()" |
| 5 |
CYTHONIZE -i -3 --annotate-fullc fullc_annotated.pyx |
| 6 |
PYTHON -c "import fullc_annotated; fullc_annotated.check()" |
| 7 |
|
| 8 |
######## not_annotated.pyx ######## |
| 9 |
# check that html-file doesn't exist: |
| 10 |
def check(): |
| 11 |
import os.path as os_path |
| 12 |
assert not os_path.isfile(__name__+'.html') |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
######## default_annotated.pyx ######## |
| 17 |
# load html-site and check that the marker isn't there: |
| 18 |
def check(): |
| 19 |
from codecs import open |
| 20 |
with open(__name__+'.html', 'r', 'utf8') as html_file: |
| 21 |
html = html_file.read() |
| 22 |
|
| 23 |
from Cython.Compiler.Annotate import AnnotationCCodeWriter |
| 24 |
assert (AnnotationCCodeWriter.COMPLETE_CODE_TITLE not in html) # per default no complete c code |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
######## fullc_annotated.pyx ######## |
| 29 |
# load html-site and check that the marker is there: |
| 30 |
def check(): |
| 31 |
from codecs import open |
| 32 |
with open(__name__+'.html', 'r', 'utf8') as html_file: |
| 33 |
html = html_file.read() |
| 34 |
|
| 35 |
from Cython.Compiler.Annotate import AnnotationCCodeWriter |
| 36 |
assert (AnnotationCCodeWriter.COMPLETE_CODE_TITLE in html) |