Skip to content

A.K.A. Why 100% test coverage is not good enough OR Typing + Unit tests

License

Notifications You must be signed in to change notification settings

ashwinvis/beyond-100-test-cov

Repository files navigation

Beyond 100% test coverage

A.K.A.

  • Why 100% test coverage is not good enough
  • Typing + Unit tests

About me and the demo

Problem statement

A CLI tool which

  • Read a CSV file containing a list of cities and their founding year
  • Does some operation, for example, printing the result

How does typing help you?

  • Find edge cases such as type inconsistencies
  • Sniff out issues with branches (if-else statements) and mutations in your code

Is typing a replacement for tests?

No! Typing will not ensure:

  • Validation or correctness of your code
  • Regressions won't happen in the future

A good test suite is still required to avoid such problems

Bonus

  • pyupgrade: Let's you quickly transition to type hinting generics in Python 3.9+
  • stubgen: CLI tool to generate

Thanks

SMHI

About

A.K.A. Why 100% test coverage is not good enough OR Typing + Unit tests

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published