November Rx/Tx


Unit testing with pytest—not easily ignored

Not as easy as advertised!

Days 10–12 of the 100 Days of Code course from TalkPython is dedicated to unit testing with pytest, and has been a plenitude of information. Prior to this, I had very little experience with pytest and found it less intuitive than the language itself—at least at first. And I think this was due to trying to sophisticate the actual tests; rather than hardcoding the input and expected output of a given test for a function with the parametrize decorator, I would essentially try to rewrite the function logic in a different way to reproduce the …

more ...

100 Days of Code

Days 1–3: Working with Python's datetime module

I'm two weeks into a protracted break from school—a 6-week long holiday before term 2 commences—so I picked up a free online MIT IAP 4-week course in C and C++, and finally started a couple Python courses I bought about a year ago from TalkPython taught by Mike Kennedy. They're admittedly a little basic for my level of Python now, but I'm still learning some Pythonic fundamentals I missed as well as reinforcing good habits so it's been a sound investment of my extra free time while on term break. I completed …

more ...