Day 17 100 Days of Code

Today I spent more time unit testing Python. Remember those easy (not easy) Python exercises from earlier in the week here? I’m adding tests for these. Everything is uploaded to my GitHub repo.

I struggled with Pytest for a while today. All of my exercises were set up to accept arguments at the command line with sys.argv. This was causing problems with the tests, passing incorrect arguments, wrong number of arguments, etc. I simplified this by removing the use of sys.argv on the exercises to be tested; actually just commented out the line.

This evening I look forward to adding more tests for these. Now that the bugs are worked out, this show go a lot more smoothly. We’ll see!

If this #100DaysOfCode is news to you, here’s day #1 with more information: http://stephanietech.net/2017/01/06/100daysofcode/ https://github.com/SFoskitt/100-days-of-code/blob/master/log.md

Published: January 28 2017