File: test032.py

package info (click to toggle)
pyjamas 0.7~%2Bpre2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 10,656 kB
  • ctags: 12,331
  • sloc: python: 74,493; php: 805; sh: 291; makefile: 59; xml: 9
file content (21 lines) | stat: -rw-r--r-- 324 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def i(x):
    return x

class Foo:
    pass

def test_builtins():
    x = []
    y = callable(x)
    z = map(i, x)
    filter(callable, z)
    dir(x)
    if hasattr(x, "foo"):
        foo = getattr(x, "foo")

    f = Foo()
    setattr(f, "bar", 42)
    if hasattr(f, "bar"):
        bar = getattr(f, "bar")

test_builtins()