Improve python magic test and add stubs for spell and parallel tests