Skip to content

Convert yield-based tests to nose2 @params decorator#6162

Draft
JanuszL wants to merge 7 commits intoNVIDIA:mainfrom
JanuszL:rework_nose2_renamed
Draft

Convert yield-based tests to nose2 @params decorator#6162
JanuszL wants to merge 7 commits intoNVIDIA:mainfrom
JanuszL:rework_nose2_renamed

Conversation

@JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Jan 15, 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

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 15, 2026

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

@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 15, 2026

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41833773]: BUILD STARTED

- 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 <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL JanuszL force-pushed the rework_nose2_renamed branch from a62e0ad to c181caf Compare January 15, 2026 20:33

import nose.tools as tools
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'.
@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 16, 2026

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41864947]: BUILD STARTED

@JanuszL JanuszL force-pushed the rework_nose2_renamed branch from c181caf to eb280d4 Compare January 16, 2026 09:10
@JanuszL JanuszL changed the title Rework nose2 renamed Convert yield-based tests to nose2 @params decorator Jan 16, 2026
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL JanuszL force-pushed the rework_nose2_renamed branch from eb280d4 to b9608bb Compare January 16, 2026 11:25
@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 16, 2026

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41878636]: BUILD STARTED

@JanuszL JanuszL marked this pull request as draft January 16, 2026 13:55
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41864947]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [41878636]: BUILD FAILED

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.

5 participants