Skip to content

Add some tests for formatting time for display!#7

Open
nelhage wants to merge 1 commit intothisisparker:mainfrom
nelhage:test-timer
Open

Add some tests for formatting time for display!#7
nelhage wants to merge 1 commit intothisisparker:mainfrom
nelhage:test-timer

Conversation

@nelhage
Copy link

@nelhage nelhage commented Mar 3, 2019

  • 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.

- 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.
@thisisparker
Copy link
Owner

Awesome, thank you so much!

@nelhage
Copy link
Author

nelhage commented Mar 3, 2019

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!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants