Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70792
| Date | 2014-04-30 16:32 -0700 |
|---|---|
| From | Ethan Furman <ethan@stoneleaf.us> |
| Subject | Re: unittest weirdness |
| References | <531F78E9.5020103@stoneleaf.us> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9617.1398902205.18130.python-list@python.org> (permalink) |
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~
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: unittest weirdness Ethan Furman <ethan@stoneleaf.us> - 2014-04-30 16:32 -0700
csiph-web