Re: unittest weirdness

Discussion in 'Python' started by Ethan Furman, May 1, 2014.

  1. Ethan Furman

    Ethan Furman Guest

    On 03/11/2014 01:58 PM, Ethan Furman wrote:
    >
    > So I finally got enough data and enough of an understanding to write some unit tests for my code.


    > The weird behavior I'm getting:
    >
    > - when a test fails, I get the E or F, but no summary at the end
    > (if the failure occurs in setUpClass before my tested routines
    > are actually called, I get the summary; if I run a test method
    > individually I get the summary)
    >
    > - I have two classes, but only one is being exercised
    >
    > - occasionally, one of my gvim windows is unceremoniously killed
    > (survived only by its swap file)
    >
    > I'm running the tests under sudo as the routines expect to be run that way.
    >
    > Anybody have any ideas?


    For posterity's sake:

    I added a .close() method to the class being tested which destroys its big data structures; then I added a tearDownClass
    method to the unittest. That seems to have done the trick with getting the tests to /all/ run, and by apps don't
    suddenly disappear. :)

    --
    ~Ethan~
     
    Ethan Furman, May 1, 2014
    #1
    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. Richard Wesley

    unittest problems

    Richard Wesley, Jul 28, 2003, in forum: Python
    Replies:
    3
    Views:
    298
    John J. Lee
    Jul 30, 2003
  2. steve
    Replies:
    4
    Views:
    551
    Brian van den Broek
    Mar 13, 2005
  3. Paul  Moore
    Replies:
    1
    Views:
    403
    Paul Moore
    Oct 14, 2008
  4. Ethan Furman

    unittest weirdness

    Ethan Furman, Mar 11, 2014, in forum: Python
    Replies:
    13
    Views:
    118
    Terry Reedy
    Mar 13, 2014
  5. Ethan Furman

    Re: unittest weirdness

    Ethan Furman, Mar 11, 2014, in forum: Python
    Replies:
    0
    Views:
    73
    Ethan Furman
    Mar 11, 2014
Loading...

Share This Page