diff --git a/tests/run/raise_memory_error_T650.pyx b/tests/run/raise_memory_error_T650.pyx index 065faf2c9afb78ff85e4782b9c22aca955cf33e3..76b1ef4abb43da949f2545b6691ed5bc86207556 100644 --- a/tests/run/raise_memory_error_T650.pyx +++ b/tests/run/raise_memory_error_T650.pyx @@ -2,6 +2,7 @@ cimport cython + @cython.test_assert_path_exists( '//RaiseStatNode', '//RaiseStatNode[@builtin_exc_name = "MemoryError"]') @@ -13,6 +14,7 @@ def raise_me_type(): """ raise MemoryError + @cython.test_assert_path_exists( '//RaiseStatNode', '//RaiseStatNode[@builtin_exc_name = "MemoryError"]') @@ -24,6 +26,7 @@ def raise_me_instance(): """ raise MemoryError() + def raise_me_instance_value(): """ >>> raise_me_instance_value() @@ -32,3 +35,13 @@ def raise_me_instance_value(): MemoryError: oom """ raise MemoryError("oom") + + +def raise_me_instance_value_separate(): + """ + >>> raise_me_instance_value_separate() + Traceback (most recent call last): + ... + MemoryError: oom + """ + raise MemoryError, "oom"