From ca03d568bf3aa5baee708a65d3cc26217e62f046 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 10 Dec 2010 18:06:43 -0800 Subject: [PATCH] cython.inline test --- Cython/Build/Inline.py | 2 +- Cython/Build/Tests/TestInline.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 Cython/Build/Tests/TestInline.py diff --git a/Cython/Build/Inline.py b/Cython/Build/Inline.py index 1ef7a218..abbcfb42 100644 --- a/Cython/Build/Inline.py +++ b/Cython/Build/Inline.py @@ -92,7 +92,7 @@ def cython_inline(code, get_type = lambda x: 'object' code, literals = strip_string_literals(code) code = strip_common_indent(code) - ctx = Context(include_dirs, default_options) + ctx = Context(cython_include_dirs, default_options) if locals is None: locals = inspect.currentframe().f_back.f_back.f_locals if globals is None: diff --git a/Cython/Build/Tests/TestInline.py b/Cython/Build/Tests/TestInline.py new file mode 100644 index 00000000..8a8fb78d --- /dev/null +++ b/Cython/Build/Tests/TestInline.py @@ -0,0 +1,8 @@ +from Cython.Shadow import inline + +from Cython.TestUtils import CythonTest + +class TestStripLiterals(CythonTest): + + def test_inline(self): + self.assertEquals(inline("return 1+2"), 3) -- 2.26.2