Skip to content

Better testing - robust exception checks and missing file checks

Vijay Kartik requested to merge better_exception_message_testing into master
  1. The old stle of checking the starting string of the Exceptioninfo object from pytest was very brittle and I always wanted to have a better way than simply a startswith() call on a string pulled from the object.

    Now in the updated pytest version pytest.raises uses a 'match' parameter for exactly this problem!

  2. Use temporary copies of directories to test file deletion

    This avoids the whole headache of deleting files from the test data directory for testing behaviour with missing files, and then recreating the files for other tests which would then depend on the existence of those files.

Merge request reports

Loading