pytest-play plugin with restricted Python expressions and assertions and it is based on the RestrictedPython …
https://github.com/tierratelematics/play_python
latest