[Python] Combining unittest with ddt.idata

Discussão em 'Python' iniciado por Stack, Agosto 13, 2025.

  1. Stack

    Stack Membro Participativo

    I have some tests that are developed using @idata decorator from ddt package.

    I want to run only one of decorated test methods (test01_...) in the test class, not all of them.

    Trouble is it seems to conflict with unittest notation of selecting specific tests shown as in Running a single test from unittest.TestCase via the command line : no approach listed there seems to work, not specifying TestClass.test01_... on commandline neither passing arguments to unittest.main().

    Is there some way to achieve it?

    Continue reading...

Compartilhe esta Página