[CentralOH] Notes from COhPy November 2021

Damien Calloway damiencalloway at fastmail.com
Mon Nov 29 20:13:07 EST 2021


Hello !

COhPy November 2021 recap
Jeff Allman presented a talk on unittest and pytest - with a bit of Selenium added in at the end for good measure. We had a number of new people in attendance, peaking at about 22.
Jeff prefers pytest but gave a demo of both tools, and shared some good insight on how to use testing when writing Python code. He also showed how to test web pages with Selenium at the end.
"Friends don't let friends use unittest" - Jason Green
Justin Freyermuth wanted to know about a few beginner friendly resources. Shelby recommended the freecodecamp channel on YouTube, and Real Python. Mike S pointed out the importance of learning by doing :
"@Justin - Reading books and watching videos is "inhaling". The real learning comes from "exhanling"... the typing and running and debugging. Learn to type fast and a lot :-)"
I suggested Automate the Boring Stuff, because that book is 1) online available for free, and 2) dos a good job of presenting short projects that solve real world problems. One can then use that as a jumping off point to do their own thing.
When discussing how to test code that already exists, but has no tests written, Jim Pryor recommended the book "Working Effectively with Legacy Code" by Michael Feathers :
"Feather's definition of legacy code is code without tests.
If you just some code without tests, that is legacy code according to Feathers."
===========

Resources mentioned during this talk - and the sidebar conversations :
unittest (built into Python) - https://docs.python.org/3/library/unittest.html
pytest - https://docs.pytest.org/en/6.2.x/
selenium - https://selenium-python.readthedocs.io/
Real Python - https://realpython.com
w3schools - https://www.w3schools.com/python/
Automate the Boring Stuff - https://automatetheboringstuff.com/
Working Effectively with Legacy Code by Michael Feathers - https://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052

Sent from Mailspring (https://getmailspring.com/), the best free email app for work
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/centraloh/attachments/20211129/46bbd6ee/attachment.html>


More information about the CentralOH mailing list