[Tutor] Unittest question

Albert-Jan Roskam sjeik_appie at hotmail.com
Sun Jul 31 17:02:20 EDT 2022


   Me likey :-) https://bugs.python.org/msg151444
   Looks like a clean approach
   On Jul 31, 2022 22:53, Albert-Jan Roskam <sjeik_appie at hotmail.com> wrote:

     On Jul 31, 2022 18:19, Albert-Jan Roskam <sjeik_appie at hotmail.com>
     wrote:

        suite.addTests(MyTest(implementation="CFFI"))

              suite.addTests(MyTest(implementation="ctypes"))   

          

     Hmm, maybe addTest and not addTests. 
     I found this SO post with a very similar approach. Will try this
     tomorrow. https://stackoverflow.com/questions/32899/how-do-you-generate-dynamic-parameterized-unit-tests-in-python
     And unittest has "subtests", which may also work


More information about the Tutor mailing list