4
assert isinstance(file, (str, unicode)), \
5
u"not a string, found '%s' instead" % file.__class__.__name__
9
assert isinstance(file, (str, unicode)), \
10
u"not a string, found '%s' instead" % file.__class__.__name__
24
@cython.test_fail_if_path_exists(
25
'//PyMethodCallNode/NameNode[@name="type" and @entry.is_cfunction=False]',
26
'//SimpleCallNode/NameNode[@name="type" and @entry.is_cfunction=False]',
27
'//SimpleCallNode/NameNode[@name="len" and @entry.is_cfunction=True]',
29
@cython.test_assert_path_exists(
30
'//SimpleCallNode/NameNode[@name="type"]',
31
'//SimpleCallNode/NameNode[@name="type" and @entry.is_cfunction=True]',
32
'//PyMethodCallNode/NameNode[@name="len"]',
40
>>> print(test_file_py('abc'))
42
>>> print(range('abc'))
47
print test_file_c(arg)
51
def test_for_in_range(arg):
53
>>> print(str(test_for_in_range('abc')).replace("u'", "'"))
54
['r', 'a', 'n', 'g', 'e', 'a', 'b', 'c']