Add import guard for scipy in tests