Skip to content

use pytest framework for tests instead of unittest #107

@VigneshVSV

Description

@VigneshVSV

We want to eventually move to pytest framework instead of unittest framework. I originally liked writing tests as objects, but it got quickly out of hand when the code became shared in unnatural ways. Permutations and combinations of inputs were also not well harnessed.

Therefore its best to move tests to pytest. We will recreate all the tests in pytest framework and then get rid of the older tests, not do a per-file replacement.

To start off:

  • add pytest to test dependencies and setup a CI/CD job that will run pytest (all OS, all major python versions above or equal to 3.11)
  • Cast test_01 (not test_00 to pytest format) to pytest format
  • Setup conftest.py where common fixtures will be used
  • Use ordering fixture to set test_01 as the first test (although it would still be useful to call the test_01 as test_01)
  • generate coverage report (dont upload it)

Metadata

Metadata

Assignees

Labels

beginnerbeginner level good first issues, usually issues that can worked on without skimming the whole repogood first issueGood for newcomers

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions