I'm trying to write a testing script in python to test multiple files containing the same functions (coding assignments). I currently have a single test script that imports the file destined for testing and runs several tests using a class that inherits from unittest.TestCase:
from file_to_test import *
class Testing(unittest.TestCase):
<tests...>
I was wondering if there is a way to write another code that iterates over all files that should be tested, allowing us to test them all in one run. can this be done somehow? I thought about writing all outputs to a file and then using diff, but I wonder if there is a different solution.
thanks a lot!