Perhaps the code needs to be maintained and integrated with external data sources. Or, perhaps the notebook itself produces results that are useful and need to be run on a regular basis. However, in my experience what typically happens with notebooks is soon the code in the notebook moves beyond data exploration and is useful for further work. Often Jupyter notebooks with Python are used for data exploration, and so users may not choose (or need) to write unit tests for their notebook code since they typically may be looking at results for each cell as they progress through the notebook, then coming to a conclusion, and moving on. This should be especially true for production code, library code, or if you ascribe to test driven development, during the entire development process. Most of us agree that we should write unit tests, and many of us actually do.
0 Comments
Leave a Reply. |