[Pythonmac-SIG] unittest Question

Josh English english at spiritone.com
Sat Jul 19 01:32:44 EDT 2003


I have another quick (and dumb) question. I am trying to use the
unittest module to test a function I am trying to write. I am working on
Mac OS 9 using Python 2.2.2 (I am always slow to upgrade) and I am
basing my unittest development off of Dive Into Python's chapter on
unittesting (http://www.diveintopython.org/roman_stage1.html). 
I don't have a command line, so when I run the program using
unittest.main() I get the following output:


----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

So I can't figure out why unittest isn't running tests. I also can't
figure out how to pass command-line arguments to the function call.
Looking at the code I thought that unittest.main(argv='-v') would work,
but all I get is an error that "module object has no attribute 'v'"

Can anyone help me on yet another dumb question?

Thanks,
Josh English
english at spiritone.com



More information about the Pythonmac-SIG mailing list