Here are the examples of the python api frames._getframe taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: frames.py Source File: test.py
def test_non_native_behave_like_native_frames():
# Not the best scenario to test it since not all implementations actually
# support the `level` argument. But the ones that do, raise `ValueError`.
with pytest.raises(ValueError):
frames._getframe(999)
with pytest.raises(ValueError):
import sys
sys._getframe(999)