def _func(): assert UserFunction.clear() assert UserFunction.select() == {} yield assert UserFunction.clear() assert UserFunction.select() == {}