Skip to content

Conversation

@JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Jan 14, 2026

  • 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

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

  • 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

Additional information:

Affected modules and functionalities:

  • python tests
  • qa test invocation bash scripts

Key points relevant for the review:

  • if removing yield is correct everywhere

Tests:

  • Existing tests apply
    • all tests that used nose
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

- 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]>
@greptile-apps
Copy link

greptile-apps bot commented Jan 14, 2026

Skipped: This PR changes more files than the configured file change limit: (137 files found, 100 file limit)

@JanuszL JanuszL marked this pull request as draft January 14, 2026 11:49
@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 14, 2026

!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

This 'lambda' is just a simple wrapper around a callable object. Use that object directly.
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

Module 'unittest' is imported with both 'import' and 'import from'.
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41721355]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41721355]: BUILD FAILED

Signed-off-by: Janusz Lisiecki <[email protected]>
Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 14, 2026

!build

[3],
rot_image_setup,
None,
lambda x: np.rot90(x),

Check notice

Code scanning / CodeQL

Unnecessary lambda Note test

This 'lambda' is just a simple wrapper around a callable object. Use that object directly.
[3],
rot_image_setup,
True,
lambda x: np.rot90(x),

Check notice

Code scanning / CodeQL

Unnecessary lambda Note test

This 'lambda' is just a simple wrapper around a callable object. Use that object directly.
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41733614]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41733614]: BUILD FAILED

Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 14, 2026

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41753697]: BUILD STARTED

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