Ajay Tripathi added the comment:
Hi pual,
> The issue of testing a script that uses argparse has come up on StackOverFlow
> a number of times.
Sorry for the confusing but this is not a support ticket,
I am not stuck with a problem and I am aware of the variaous solutions on
Stackoverflow to
paul j3 added the comment:
The issue of testing a script that uses argparse has come up on StackOverFlow a
number of times.
As noted the unittesting framework(s) often use their own parsers (not
necessarily argparse). That means they are looking at the sys.argv
commandline. It is diffic
Ajay Tripathi added the comment:
Hi,
Thanks for your response, here is a code sample of what I am doing right now:
```
import unittest
import sys
class MyTest(unittest.TestCase):
def __init__(self, testName, extraArg):
super(MyTest, self).__init__(testName)
self.myExtraA
Karthikeyan Singaravelan added the comment:
Can you please post the unittest script and the desired behavior? Are you
testing your own argument parser created using argparse or want to write
something replacing the argument parser of the unittest module like creating a
custom unittest runner
New submission from Ajay Tripathi :
I am currently writing a unittest script that requires argparser but since the
unittest module already has a ArgumentParser instance, I cannot create and use
my own ArgumentParser instance.
Possible solution:
The problem would be solved I could inherit th