Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest cleanup #97

Merged
merged 14 commits into from
Apr 20, 2024
Merged

Pytest cleanup #97

merged 14 commits into from
Apr 20, 2024

Conversation

takishida
Copy link
Collaborator

Migrate existing pytests with the old method to the new method.

The old method:

  • All tests are in one single file test_logic.py.
  • JSON files, which is to simulate the query outputs, for all checks are stored in the same root test folder, which makes it hard to tell which files are used for which test.
  • The actual logic in aci-preupgrade-validation-script.py was modified to feed the simulated data (JSON files) for pytest.

The new method:

  • Tests for each check are in its own folder along with the JSON files specifically for the check
  • With the monkeypatch fixture from pytest, there is no need to embed codes specific to pytest inside the actual logic of aci-preupgrade-validation-script.py.

@takishida takishida merged commit d52fa97 into master Apr 20, 2024
@takishida takishida deleted the pytest-cleanup branch May 6, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant