slaprunner: fix test and add safety net
slaprunner.test: Small code cleaning