File: test_breakpoint.py

package info (click to toggle)
restrictedpython 8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,072 kB
  • sloc: python: 4,043; makefile: 193
file content (10 lines) | stat: -rw-r--r-- 360 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
from RestrictedPython import compile_restricted_exec


def test_call_breakpoint():
    """The Python3.7+ builtin function breakpoint should not
    be used and is forbidden in RestrictedPython.
    """
    result = compile_restricted_exec('breakpoint()')
    assert result.errors == ('Line 1: "breakpoint" is a reserved name.',)
    assert result.code is None