Friday finking: TDD and EAFP
Peter J. Holzer
hjp-python at hjp.at
Sun Nov 3 16:28:17 EST 2019
On 2019-11-04 08:14:37 +1300, DL Neil via Python-list wrote:
> Perhaps 'Python pros' don't use TDD. Which in-and-of-itself, somewhat
> answers the question!
A certain Youtube channel has T-shirts for sale with this text:
DON'T TRY THIS AT HOME
WE ARE PROFESSIONALS
because we get paid to do this
I get paid to write Python code, so I'm a Python professional, right?
I never really used TDD, but I was quite used to writing tests when I
was writing in Perl. The TAP framework is really simple (some might say
primitive) and the entry barrier to writing tests is extremely low.
Besides, everybody was doing it.
When I switched to Python, I mostly lost this habit. Python testing felt
clunky, Java-ish, and the other Python programmers weren't writing tests
either.
I have since tried to get into the habit of always writing tests again,
but with limited success. unittest still feels clunky, The django
framework only works well if your problem fits exactly into a rather
narrow niche (which none of our project really fits into). I have
recently started to use pytest. That feels a bit more comfortable. We'll
see.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp at hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20191103/2162ebac/attachment.sig>
More information about the Python-list
mailing list