del x; assert "x" not in locals() -> assertion fails
This test script passes on CPython, but the assert
fires on PyPy (tested with pypy38 7.3.7 on linux, using the official binary from pypy.org)
def main():
x = object()
def foo():
print(x)
locals()
del x
assert "x" not in locals()
main()