summaryrefslogtreecommitdiff
path: root/tests/run/boolean_context.pyx
blob: 21269f222e46f233d707e8053f14a5c25e874571 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

def test():
    """
    >>> test()
    True
    """
    cdef int x = 5
    return bool(x)

def test_bool_and_int():
    """
    >>> test_bool_and_int()
    1
    """
    cdef int x = 5
    cdef int b = bool(x)
    return b