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

Add __init__.py files to convert the folders to python module. #390

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

yegle
Copy link
Collaborator

@yegle yegle commented Sep 13, 2024

Description

This allows one to run pytest in the root folder to trigger all the tests, instead of needing to modify PYTHONPATH environment variable.

Checklist

General

  • Added the correct label
  • Assigned to a specific person or civiform/deployment-system
  • Created tests which fail without the change (if possible)
  • Performed manual testing (at a minimum run bin/setup without your changes and then bin/deploy with your changes to ensure your changes don't break existing deployments)
  • Extended the README / documentation, if necessary

Instructions for manual testing

Local test passes:

(venv) ych@penguin ~/git/cloud-deploy-infra (git)-[pytest-fix]-
$ pytest 
=================================== test session starts ===================================
platform linux -- Python 3.11.2, pytest-8.3.2, pluggy-1.5.0
rootdir: /home/ych/git/cloud-deploy-infra
collected 59 items                                                                        

cloud/aws/bin/pgadmin_test.py ..................                                    [ 30%]
cloud/shared/bin/lib/check_test.py .                                                [ 32%]
cloud/shared/bin/lib/config_loader_test.py ...............                          [ 57%]
cloud/shared/bin/lib/config_parser_test.py ...                                      [ 62%]
cloud/shared/bin/lib/variable_definition_loader_test.py .                           [ 64%]
cloud/shared/bin/lib/write_tfvars_test.py ...                                       [ 69%]
cloud/shared/validate_variable_definitions_test.py ..................               [100%]

=================================== 59 passed in 1.07s ===================================

Issue(s) this completes

This allows one to run `pytest` in the root folder to trigger all the
tests, instead of needing to modify PYTHONPATH environment variable.
@yegle yegle requested a review from avaleske September 13, 2024 17:54
@yegle yegle added the enhancement New feature or request label Sep 13, 2024
@yegle yegle merged commit 5f8a938 into main Sep 13, 2024
11 of 12 checks passed
@yegle yegle deleted the pytest-fix branch September 13, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants