If you call the program below with python filename.py -d abc you get unittest help. If you call filename.py /d abc you get:
AttributeError: 'module' object has no attribute '/d'
I'd like to create my own CLI switches. To specify config file or some such CLI switch. I've tried --d as well. Is there a method for unittest to accept allow other switches?
import unittest
class SomeTests(unittest.TestCase):
def test_one(self):
theTest( 'keith' )
def test_two(self):
otherTest( 'keith')
if __name__ == '__main__':
unittest.main( argv=sys.argv, testRunner = unittest.TextTestRunner(verbosity=2))