It actually would be better to just test whether the length of config.SPARK_TESTS is greater than zero. If people don't want to run Spark tests they can just put an empty list there.