test_mirrors.py and mirrors.py: modified