Rename test file
Use underscore in dir name instead of dash
Make test work again with new paths
Simplify clear_context() by creating a new instance

Make clear_context more robust by creating a new uninitialized state
instead of removing known modifications.
Also add a test for clear_context.