Python vs C for a mail server
peter at engcorp.com
Sun Jan 29 11:10:29 EST 2006
Jens Theisen wrote:
> Test failures, however, don't tell you anything about the current usage of
> your program - just about the inteded usage at the point where the test
> was writte. Clearly you can't test _anything_? And clearly you can never
> be sure that all you collegues did so as well? This not only about type
> safety, but simply name safety.
> What do you do when you want to no if a certain method or function is
> actually used from somewhere, say "foobar", it a language which allows
> (and even encourages) that it could be called by:
> getattr(obj, "foo" + "bar")()
> There is no systematic way to find this call.
While this isn't really a "test", as you are really asking about
something to do with managing your code base, it is quite possible to
write a test which *does* check whether foobar() is called, and even to
pinpoint all places from which it is called, if that's really what you
want to do. Believing you can't do that suggests you have no real
experience with writing tests for code, so it might be best not to argue
so strenuously against them.
More information about the Python-list