Moved __main__ tests to tests.py using pytest.