The snippets introduced in #1690 are intended to be testable against the API (almost system tests). @dhermes brought up the following issues about them:
[We need]
A clear story on when these snippets are run (i.e. update tox.ini)
Way fewer pylint disable statements
Integrating with unittest, it seems your main() is emulating some of that functionality.