- Extract separate function for running tests from main
- Push single-usage imports to point of usage
- Remove unnecessary sys.exit(0) calls
Unrelated, but I wonder if we should augment this logic to garbage collect old lit_tmp_ directories that are 24+ hours old. I routinely find lots of leaked lit_tmp_ directories because oftentimes the parent Python process is killed before it gets to the finally block below.