Skip to content

Add some tests for formatting time for display! #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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