Refactoring tox-current-test and tox-current-class using a macro