Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70792 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2014-04-30 16:32 -0700 |
| Last post | 2014-04-30 16:32 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: unittest weirdness Ethan Furman <ethan@stoneleaf.us> - 2014-04-30 16:32 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2014-04-30 16:32 -0700 |
| Subject | Re: unittest weirdness |
| Message-ID | <mailman.9617.1398902205.18130.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web