Use proper pytest exception check

1 job for !144 with test-no-data-fix in 23 minutes and 34 seconds (queued for 8 seconds)
latest merge request