reading argv argument of unittest.main()

Discussion in 'Python' started by winston.yang@netrics.com, May 10, 2007.

  1. Guest

    I've read that unittest.main() can take an optional argv argument, and
    that if it is None, it will be assigned sys.argv.

    Is there a way to pass command line arguments through unittest.main()
    to the setUp method of a class derived from unittest.TestCase?

    Thank you in advance.

    Winston
     
    , May 10, 2007
    #1
    1. Advertising

  2. En Thu, 10 May 2007 14:42:56 -0300, <> escribió:

    > I've read that unittest.main() can take an optional argv argument, and
    > that if it is None, it will be assigned sys.argv.
    >
    > Is there a way to pass command line arguments through unittest.main()
    > to the setUp method of a class derived from unittest.TestCase?


    Can't you use sys.argv[] directly inside setUp()?

    --
    Gabriel Genellina
     
    Gabriel Genellina, May 11, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bret

    char **argv vs. char* argv[]

    Bret, Aug 31, 2003, in forum: C Programming
    Replies:
    21
    Views:
    4,627
    Richard Heathfield
    Sep 3, 2003
  2. David
    Replies:
    10
    Views:
    5,996
    Richard Heathfield
    Sep 15, 2003
  3. Hal Styli
    Replies:
    14
    Views:
    1,675
    Old Wolf
    Jan 20, 2004
  4. =?ISO-8859-1?Q?Thomas_N=FCcker?=

    sys.argv[0] - 'module' object has no attribute 'argv'

    =?ISO-8859-1?Q?Thomas_N=FCcker?=, Jun 30, 2003, in forum: Python
    Replies:
    0
    Views:
    935
    =?ISO-8859-1?Q?Thomas_N=FCcker?=
    Jun 30, 2003
  5. Paul  Moore
    Replies:
    1
    Views:
    395
    Paul Moore
    Oct 14, 2008
Loading...

Share This Page