Convert all tests to pytest · Issue #99 · aws/aws-encryption-sdk-python (original) (raw)

A lot of the original test suite was written in unittest. Let's get all of that moved over to pytest.

Initially, this should be converting unittest.TestCase classes to pytest classes similar to what was done in #98. We can pull those methods out to stand-alone functions later if we decide we want to, but leaving them in classes will make the diffs most simpler.

I would also like to opportunistically remove some of the over-zealous mocking present in these classes where we can.

Test modules to convert:

Due to the changes that will need to happen, anyone looking at this please follow the following guidelines:

  1. Convert from unittest classes to classes using pytest first. We can change to functions later if desired, but converting the classes directly will minimize the changes in each test file.
  2. One test file per PR. This will minimize the amount of changes that need to be reviewed and speed up the review process.
  3. Run tox -re autoformat before committing to apply our formatting rules.