You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While upgrading to pytest v8, it was discovered that our unit tests have a lot of interdependence. Creating this issue to act as an epic.
Unit tests in kinto should:
Be independent of each other. We should be able to run one test module with the same test results as if we had run all tests.
Not create side effects. If a test needs to create a mock or a test file, that mock or test file should be removed during teardown.
Examples of issues:
Running pytest tests/test_views_version.py results in a test error because it relies on something setup in another test
Several tests appear to have setUp and setUpClass methods that create test state, but no associated teardown methods that reset it
Given how extensive our test scenarios are in kinto (over 2000 at this time), this may take significant effort to research and correct all cases. We should probably do this in phases to make the PR's readable.
The text was updated successfully, but these errors were encountered:
While upgrading to pytest v8, it was discovered that our unit tests have a lot of interdependence. Creating this issue to act as an epic.
Unit tests in kinto should:
Examples of issues:
pytest tests/test_views_version.py
results in a test error because it relies on something setup in another testsetUp
andsetUpClass
methods that create test state, but no associated teardown methods that reset itGiven how extensive our test scenarios are in kinto (over 2000 at this time), this may take significant effort to research and correct all cases. We should probably do this in phases to make the PR's readable.
The text was updated successfully, but these errors were encountered: