Here's a crazy idea: single addresss space for the kernel, virtual memory for applications in userland since their memory grows more unpredictably. I guess this dual approach would need hardware support?
I'm on my mobile, so I can't paste code here. But the way I do it is to subclass the flask app and setup the routes in the setup method. Almost nothing happens on module scope. All views are defined in a seperate module using subclasses of flask views and they hold weak references to the app object. With this setup I neve had any problems testing individual modules. It also works together with flask's unit test client.