diff --git a/tests/run/annotate_html.pyx b/tests/run/annotate_html.pyx
index d3108b95d870232c2d817acb9f25e42e0b13e7ed..88fde041c5d6be337a6e1bb40881bb992902aa82 100644
--- a/tests/run/annotate_html.pyx
+++ b/tests/run/annotate_html.pyx
@@ -2,7 +2,7 @@
 >>> import os.path as os_path
 >>> module_path = os_path.join(os_path.dirname(__file__), os_path.basename(__file__).split('.', 1)[0])
 >>> assert module_path.endswith('annotate_html')
->>> assert os_path.exists(module_path + '.c'), module_path
+>>> assert os_path.exists(module_path + '.c') or os_path.exists(module_path + '.cpp'), module_path
 >>> assert os_path.exists(module_path + '.html'), module_path
 
 >>> with open(module_path + '.html') as html_file: