Running one single test...

Discussion in 'Python' started by Timothy Grant, Aug 22, 2003.

  1. At work we use Perl and a home rolled unittesting mechanism. One of the things
    I love about That testing mechanism is that I can run one single test. In
    fact, I've configured Vim to run the current test and either tell me if it
    passes or tell me the error when it doesn't.

    I'd love to do something similar with PyUnit, but I have yet to figure out how
    to run one single test.

    Any help would be greatly appreciated.

    Thank you.

    --
    Stand Fast,
    tjg.

    Timothy Grant
    www.craigelachie.org
     
    Timothy Grant, Aug 22, 2003
    #1
    1. Advertising

  2. Timothy Grant

    Peter Hansen Guest

    Timothy Grant wrote:
    >
    > At work we use Perl and a home rolled unittesting mechanism. One of the things
    > I love about That testing mechanism is that I can run one single test. In
    > fact, I've configured Vim to run the current test and either tell me if it
    > passes or tell me the error when it doesn't.
    >
    > I'd love to do something similar with PyUnit, but I have yet to figure out how
    > to run one single test.
    >
    > Any help would be greatly appreciated.


    From the command line, assuming your tests are functions named testNN() in a
    class called MyTestCase in a file called tests.py:

    python tests.py MyTestCase.test01

    -Peter
     
    Peter Hansen, Aug 22, 2003
    #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. Skybuck Flying

    Call oddities: &Test() vs &Test vs Test

    Skybuck Flying, Oct 4, 2009, in forum: C Programming
    Replies:
    1
    Views:
    726
    Skybuck Flying
    Oct 4, 2009
  2. Chris Roos

    Running one test with test/unit

    Chris Roos, Oct 30, 2005, in forum: Ruby
    Replies:
    1
    Views:
    97
    Chris Roos
    Oct 30, 2005
  3. Peter Recore
    Replies:
    1
    Views:
    109
    Christopher Dicely
    Feb 16, 2008
  4. Hunt Jon
    Replies:
    1
    Views:
    118
    Patrick Doyle
    Dec 15, 2008
  5. Fernando Perez
    Replies:
    3
    Views:
    97
    Fernando Perez
    Apr 17, 2009
Loading...

Share This Page