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

318: Get existing tests working #319

Merged

Conversation

John-Sharples
Copy link

In this PR:

  • Added functionality to conftest.py to write some test files to a temp directory
  • Use temp files to run tests in test/
  • Tests can now be run with pytest test/
  • METdbLoad/test/test_tables.py wrapped in a function and marked to skip.

Not in the PR

  • An assessment of whether the current tests do anything useful
  • The tests in tests/ (plural) still error during setup

Pull Request Testing

  • Describe testing already performed for these changes:

    Run locally

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Please check these changes run wherever we expect this code to work

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
    Extensive comments in code.

  • Do these changes include sufficient testing updates? [Yes]

  • Will this PR result in changes to the test suite? [Yes]

    If yes, describe the new output and/or changes to the existing output:

    tests now use temp files and can be run anywhere.

  • Do these changes introduce new SonarQube findings? [Yes or No]

    If yes, please describe:
    Not sure.

  • Please complete this pull request review by [Fill in date].

    No rush.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • 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
  • After submitting the PR, select the ⚙️ 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.

Add xml load spec and some test data
as conftest fixtures. Use these to
create temp files and make tests in
test/ use these files. Tests in tests/
still fail.
@John-Sharples John-Sharples requested review from bikegeek and georgemccabe and removed request for georgemccabe July 26, 2024 01:57
Copy link
Collaborator

@bikegeek bikegeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on RAL internal host with database and MET data, running the tests modified in this PR.

@bikegeek
Copy link
Collaborator

I will let you do the Squash and merge, and delete the branch.

@John-Sharples
Copy link
Author

@bikegeek It appears I'm not authorised to merge this PR

@bikegeek bikegeek merged commit 27a0d99 into dtcenter:develop Jul 29, 2024
7 of 9 checks passed
@bikegeek
Copy link
Collaborator

bikegeek commented Jul 29, 2024 via email

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.

2 participants