Automated testing

Check important behavior automatically so research code can be changed with confidence.

Developer Tools & Best Practices Practice Recommend Provisional Teaching

Our View

Recommend Provisional Teaching

Tests make scientific assumptions and expected behavior explicit, and help catch regressions as analysis code develops.

Provisional positions are editorial proposals awaiting group review.

Teaching — Covered in our robust software and AI-assisted development topics; individual offerings are not yet attributed to this practice.

0 topics with recorded teaching · 0 past offerings · 0 upcoming offerings

Related themes: Neural Data AnalysisScientific Computing

Related topics: AI-Assisted Software DevelopmentMachine Learning(M)EEG AnalysisNeural Spike AnalysisRobust and Reusable Software

Getting started

Start with a small analysis function and a worked example whose result you can check independently. Turn that example into a test, then add cases for empty inputs, missing values, and other conditions that matter to the analysis.

Run the tests when changing code or dependencies. For numerical results, choose tolerances that reflect the calculation rather than requiring exact floating-point equality. Tools such as pytest can make these checks easy to repeat.