Simplify energy-file comparisons in tests