79427907

Date: 2025-02-10 17:59:38
Score: 1
Natty:
Report link

When writing programs, simply import the package (or components that are needed from it). When developing a library, I start out by creating a proper package including __init__.py, __all__ and a /tests directory. The library code is run from the latter and as soon as something works properly I convert the code to a pytest compatible test fixture. When done, there is no more code, only tests that can be run by typing pytest. I usually ship the tests along with the package so that if something doesn't work on a different platform people can send me test output.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: Max Headroom