GSK-2617 Missing kwargs in a test make the whole suite fail#1748
GSK-2617 Missing kwargs in a test make the whole suite fail#1748kevinmessiaen merged 17 commits intomainfrom
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
01579e0 to
0ac0529
Compare
| results: List[(str, TestResult, Dict[str, Any])] = list() | ||
| required_params = self.find_required_params() | ||
| undefined_params = {k: v for k, v in required_params.items() if k not in run_args} | ||
| if len(undefined_params): |
There was a problem hiding this comment.
there's the same check in to_unittest that should be consistent with run
There was a problem hiding this comment.
why not keep the same check but convert an exception to a warning?
There was a problem hiding this comment.
Yes that's right, a warning make a lot more sense especially with live logs now
|
@andreybavt I updated the |
Co-authored-by: Jocelyn Vernay <59055698+vjern@users.noreply.github.com>
Co-authored-by: Jocelyn Vernay <59055698+vjern@users.noreply.github.com>
|

Description
Issue
When running a test suite, we do a validation that all the parameters have been set based on the typing annotation. (type is not
Optionaland no default value has been provided.The problem is that the whole test Suite is cancelled if only one test is "misconfigured", furthermore it might happen that a required parameter is actually optional but the typing is wrong.
Solution
The validation now show a warning instead of an exception and run the Suite letting the test fail.
How to reproduce
Here is a small snippet that run a Suite with missing param
Related Issue
Type of Change