refactor spare test for rubylang
refactor spare for pythonlang test