Modifications to pytests to be able to run from any directory, e.g. top-level
Moved logic to read/load XML files into pytest fixture -- note there is an XML file (/Users/venita.hagerty/metviewer/testloadv10fewp3.xml) that I could not find that is required to run those tests, so I added pytest.skip() to prevent them from running. We could re-enable those tests once we have that file in place.
Changed imports so PYTHONPATH env var does not need to be set to run tests
Updates to prevent deprecated warning, e.g. changing string to r-string
Pull Request Testing
[X] Describe testing already performed for these changes:
Ensured all automated tests pass.
Confirmed code coverage report can be viewed through SonarQube
[X] Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Review code changes
Ensure all PR automated tests pass
Review SonarQube code coverage report
[X] Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
[X] Do these changes include sufficient testing updates? [Yes]
[X] Will this PR result in changes to the test suite? [No]
If yes, describe the new output and/or changes to the existing output:
[X] Do these changes introduce new SonarQube findings? [No]
If yes, please describe:
[X] Please complete this pull request review by 6/17/2024.
[X] Review the source issue metadata (required labels, projects, and milestone).
[X] Complete the PR definition above.
[X] Ensure the PR title matches the feature or bugfix branch name.
[X] Define the PR metadata, as permissions allow.
Select: Reviewer(s) and Development issue
Select: Milestone as the version that will include these changes
Select: Coordinated METplus-X.Y Support project for bugfix releases or METdataio-X.Y.Z Development project for official releases
[X] After submitting the PR, select the :gear: icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
[ ] After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
[ ] Close the linked issue and delete your feature or bugfix branch from GitHub.
Additional Changes in this PR
pytest.skip()
to prevent them from running. We could re-enable those tests once we have that file in place.PYTHONPATH
env var does not need to be set to run testsPull Request Testing
Ensured all automated tests pass. Confirmed code coverage report can be viewed through SonarQube
[X] Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Review code changes
Ensure all PR automated tests pass
Review SonarQube code coverage report
[X] Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
[X] Do these changes include sufficient testing updates? [Yes]
[X] Will this PR result in changes to the test suite? [No] If yes, describe the new output and/or changes to the existing output:
[X] Do these changes introduce new SonarQube findings? [No] If yes, please describe:
[X] Please complete this pull request review by 6/17/2024.
Pull Request Checklist
See the METplus Workflow for details.