cursewords
cursewords copied to clipboard
Add some tests for formatting time for display!
- Add requirements.dev.txt to install py.test
- Refactor Timer slightly so we can call the formatting method without an instance
- Add some tests! Just include some examples that span the range from seconds to hours, and verify that they display properly.
Awesome, thank you so much!
Oh I forget to mention -- just run pytest test/ to run the tests. Probably I could figure out how to hook it up to setup.py
This is often where I'll start testing an extant piece of code -- don't try to test everything, but find bits that are easy to exercise automatically and useful (in this case, especially because testing by hand otherwise involves waiting an hour or hacking something up!)