Just thought that the "If" made the "could be" redundant. It looks for a cluster launched from proj_dir/spark/bin, so that cluster was indeed launched for a test.
Might make more sense to leave out the "If" and include the "could be" though...