Add basic pytest tests for umdp3_conformance.py#216
Draft
r-sharp wants to merge 18 commits intoMetOffice:mainfrom
Draft
Add basic pytest tests for umdp3_conformance.py#216r-sharp wants to merge 18 commits intoMetOffice:mainfrom
r-sharp wants to merge 18 commits intoMetOffice:mainfrom
Conversation
…es which git / VS Code are marking as in conflict. Annoyingly, this seems to have introduced a bug as well.
…esolving clashes. But looking at it, I really can't fathom out 'how'
…n't edited this file...
…iority checks missing from umdp3_conformance.py. That was fun
…sts - I think the power has gone to it's head...
…ext line where it no longer works...
…rmatter, or was it the other way round...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Sci/Tech Reviewer: @t00sa
Code Reviewer:
Adding tests to test the tester not tests to to test the tests the tester runs.
If these are tests to test the tester, where's the tests to test the tests that test the tester.
A range of pytest unit tests to test section of umdp3-conformance.py.
Some of these were suggested by CoPilot as not only as things that could/should be tested, but CoPilot was also asked to supply the original code to form the tests. (mostly where monkeypatch was involved as I'd never really played with that before).
Particularly in the case of the CoPilot written ones, they work, they seem to go to great lengths to set up objects (real or patched) and then essentially test what are trivial actions/logic in the original code.
As a method of quickly highlighting when changes are made to those objects - great.
As ways of ensuring the code does what you expect - less so. However I think integration testing would be required for most of that, not unit testing.
Code Quality Checklist
Testing
These tests have been run. They all pass.
They don't affect the actual code, so that hasn't been run in this instance.
Security Considerations
AI Assistance and Attribution
I used (I believe) GitHub CoPilot (within VSCode) to list the things it thought I should test and to generate some of this code.
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review