I have inherited a testing directory that looks like this:
tests
| this_test
| __init__.py
| this_test.py
| that_test
| __init__.py
| that_test.py
Where the __init.py__'s are empty and both this_test.py and that_test.py look like this:
from unittest import TestCase
class TestingThis(TestCase):
def test_testing(self):
self.assertTrue(1, 1)
They really are that simple. But my confusion comes from figuring out how to run these. I've always seen tests like:
import unittest
class TestingThis(unittest.TestCase):
def test_testing(self):
self.assertTrue(1, 1)
if __name__ == '__main__':
unittest.main()
Which I can run from terminal in the directory with python3 this_test.py. I've tried a multitude of ways to run these in terminal but with no success and haven't found anything in my search that shows this pattern.
Is this an actual design pattern for tests, or do these just need fixed?