-
Notifications
You must be signed in to change notification settings - Fork 656
Convert yield-based tests to nose2 @params decorator #6156
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
base: main
Are you sure you want to change the base?
Conversation
- Replaces generator-based test patterns (yield test_func, arg1, arg2) with nose2's @params decorator for parameterized testing. This makes tests compatible with nose2 test runner. - Converts yield statements to @params decorated test functions - Moves parameter generation to module-level lists/functions - Handles @raises decorator compatibility with @params - Updates QA test scripts to use nose2 instead of nosetests Signed-off-by: Janusz Lisiecki <[email protected]>
Signed-off-by: Janusz Lisiecki <[email protected]>
Signed-off-by: Janusz Lisiecki <[email protected]>
|
Skipped: This PR changes more files than the configured file change limit: ( |
|
!build |
| if name == "mean_close_approx": | ||
| return lambda x, y: np.mean(np.abs(x - y) < 0.5) | ||
| else: | ||
| return lambda x, y: np.allclose(x, y) |
Check notice
Code scanning / CodeQL
Unnecessary lambda Note test
| with_teardown as _nose2_with_teardown, | ||
| ) | ||
| from unittest import SkipTest # noqa: F401 | ||
| import unittest |
Check notice
Code scanning / CodeQL
Module is imported with 'import' and 'import from' Note test
|
CI MESSAGE: [41721355]: BUILD STARTED |
|
CI MESSAGE: [41721355]: BUILD FAILED |
Signed-off-by: Janusz Lisiecki <[email protected]>
Signed-off-by: Janusz Lisiecki <[email protected]>
|
!build |
| [3], | ||
| rot_image_setup, | ||
| None, | ||
| lambda x: np.rot90(x), |
Check notice
Code scanning / CodeQL
Unnecessary lambda Note test
| [3], | ||
| rot_image_setup, | ||
| True, | ||
| lambda x: np.rot90(x), |
Check notice
Code scanning / CodeQL
Unnecessary lambda Note test
|
CI MESSAGE: [41733614]: BUILD STARTED |
|
CI MESSAGE: [41733614]: BUILD FAILED |
Signed-off-by: Janusz Lisiecki <[email protected]>
|
!build |
|
CI MESSAGE: [41753697]: BUILD STARTED |
with nose2's @params decorator for parameterized testing. This makes
tests compatible with nose2 test runner.
Category:
Other (e.g. Documentation, Tests, Configuration)
Description:
with nose2's @params decorator for parameterized testing. This makes
tests compatible with nose2 test runner.
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A