Test module search now uses `os.walk`

- also fixed an unused variable flake8 warning