Debian Codegraph @

pypy/objspace/std/test/test_callmethod.py

raw symbols SCIP
1 class TestCallMethod:
2 def test_space_call_method(self):
3 space = self.space
4 w_lst = space.newlist([])
5 space.call_method(w_lst, 'append', space.w_False)
6 res = space.int_w(space.call_method(w_lst, '__len__'))
7 assert res == 1
8
9 def test_fallback_case(self):
10 space = self.space
11 space.int_w(space.call_method(space.wrap(space.sys),
12 'getrecursionlimit'))
13
14 def test_optimizations_enabled(self):
15 # check that the callmethod module is really enabled.
16 from pypy.objspace.std import callmethod
17 assert (self.space.FrameClass.LOAD_METHOD.__func__ ==
18 callmethod.LOAD_METHOD)
19 assert (self.space.FrameClass.CALL_METHOD.__func__ ==
20 callmethod.CALL_METHOD)