Debian Codegraph @

pypy/interpreter/test/apptest_descrtypecheck.py

raw symbols SCIP
1 import pytest
2
3 def test_getsetprop_get():
4 def f():
5 pass
6 getter = type(f).__dict__['__code__'].__get__
7 getter = getattr(getter, 'im_func', getter) # neutralizes pypy/cpython diff
8 with pytest.raises(TypeError):
9 getter(1, None)
10
11 def test_func_code_get():
12 def f():
13 pass
14 with pytest.raises(TypeError):
15 type(f).__code__.__get__(1)