Disabling code with snarky messages, then checking it in.

8 views
Skip to first unread message

C. Titus Brown

unread,
Apr 12, 2009, 10:35:56 AM4/12/09
to twil...@groups.google.com
ahem.

http://code.google.com/p/twill/source/browse/branches/0.9.2-dev/twill/tests/__init__.py?spec=svn75&r=75

I will leave the guilty person to deal with this, either by explaining
herself or by uncommenting said disabled code ;)

--titus

Pamela Zerbinos

unread,
Apr 12, 2009, 11:57:25 AM4/12/09
to twil...@googlegroups.com
I bet I don't even need to click on that to see what it is!

Ahem indeed. Basically, that bare except ate about an hour of my life
as I tried to run tests, the tests failed on that go command, and my
terminal output yelled at me about my proxy settings, which were fine
and not the problem. Eventually I realized what was going on, and I
opted for snarky commentary for obvious reasons.

In case of non-obviousness, though: it was something I wanted to think
more about and come back to. Do we really want the test *init* going
places and asserting things? I left it in there, even though I am not
so sure about the answer. And if it's staying, I think it should be
wrapped up in something, but I'm not sure what. I'm pretty against
leaving in the bare except, though, since obviously other things can
go wrong that have nothing to do with the quixote server. (And, in
fact, if that goes wrong, the tests fail earlier with more useful
error messaging.)

... but I'm not sure I can explain myself on the checking-it-in front.

-p.

C. Titus Brown

unread,
Apr 12, 2009, 12:00:31 PM4/12/09
to twil...@googlegroups.com
On Sun, Apr 12, 2009 at 10:57:25AM -0500, Pamela Zerbinos wrote:
-> I bet I don't even need to click on that to see what it is!

;)

-> Ahem indeed. Basically, that bare except ate about an hour of my life
-> as I tried to run tests, the tests failed on that go command, and my
-> terminal output yelled at me about my proxy settings, which were fine
-> and not the problem. Eventually I realized what was going on, and I
-> opted for snarky commentary for obvious reasons.

Are you familiar with 'raise'? Always a good way to see what the real
error is...

-> In case of non-obviousness, though: it was something I wanted to think
-> more about and come back to. Do we really want the test *init* going
-> places and asserting things? I left it in there, even though I am not
-> so sure about the answer. And if it's staying, I think it should be
-> wrapped up in something, but I'm not sure what. I'm pretty against
-> leaving in the bare except, though, since obviously other things can
-> go wrong that have nothing to do with the quixote server. (And, in
-> fact, if that goes wrong, the tests fail earlier with more useful
-> error messaging.)

I'd be fine with moving it somewhere else, but I think it needs to be
there, up front, for any test that depends on the test server being
available. You're only seeing the pain and agony it cased you in one
situation, but not seeing the pain and agony it caused *me* not having
it there...

-> ... but I'm not sure I can explain myself on the checking-it-in front.

heh

cheers,
--titus

Pamela Zerbinos

unread,
Apr 12, 2009, 2:45:45 PM4/12/09
to twil...@googlegroups.com
On Apr 12, 2009, at 11:00 AM, C. Titus Brown wrote:

> -> Ahem indeed. Basically, that bare except ate about an hour of my
> life
> -> as I tried to run tests, the tests failed on that go command, and
> my
> -> terminal output yelled at me about my proxy settings, which were
> fine
> -> and not the problem. Eventually I realized what was going on, and I
> -> opted for snarky commentary for obvious reasons.
>
> Are you familiar with 'raise'? Always a good way to see what the real
> error is...

Sure, but I had to find it first. I was, admittedly, not very speedy
in my tracking of this; it probably only needed to eat a few minutes
of my life. But now I know!

> -> In case of non-obviousness, though: it was something I wanted to
> think
> -> more about and come back to. Do we really want the test *init*
> going
> -> places and asserting things? I left it in there, even though I am
> not
> -> so sure about the answer. And if it's staying, I think it should be
> -> wrapped up in something, but I'm not sure what. I'm pretty against
> -> leaving in the bare except, though, since obviously other things
> can
> -> go wrong that have nothing to do with the quixote server. (And, in
> -> fact, if that goes wrong, the tests fail earlier with more useful
> -> error messaging.)
>
> I'd be fine with moving it somewhere else, but I think it needs to be
> there, up front, for any test that depends on the test server being
> available. You're only seeing the pain and agony it cased you in one
> situation, but not seeing the pain and agony it caused *me* not having
> it there...


Well. Right now, if the server isn't running, that call to
twilltestlib.get_url() fails with "server has not yet been started,"
and that happens right away. I'm cool with leaving in the commands to
make sure the server is hittable before anything else happens, but I
think the error messaging around those commands should be a little
better, is all.

-p.

C. Titus Brown

unread,
Apr 13, 2009, 12:33:28 AM4/13/09
to twil...@googlegroups.com
-> Well. Right now, if the server isn't running, that call to
-> twilltestlib.get_url() fails with "server has not yet been started,"
-> and that happens right away. I'm cool with leaving in the commands to
-> make sure the server is hittable before anything else happens, but I
-> think the error messaging around those commands should be a little
-> better, is all.

fine. whatever. as long as I don't look through the source code and
see messages like

# try:
# ...
# except WHAT, ctb??
# except:
# foo

too many more times ;)

--titus
--
C. Titus Brown, c...@msu.edu

Reply all
Reply to author
Forward
0 new messages