Github Page

Python Testing

In this lesson we use a Python library called pytest. Basic understanding of Python variables and functions are a necessary prerequisite. Some previous experience with the shell is expected, but isn’t mandatory.
Before relying on a new experimental device, an experimental scientist always establishes its accuracy. A new detector is calibrated when the scientist observes its responses to known input signals. The results of this calibration are compared against the expected response. An experimental scientist would never conduct an experiment with uncalibrated detectors - that would be unscientific. So too, simulations and analysis with untested software do not constitute science.
You can only know by testing it. Software bugs are hiding in all nontrivial software. Testing is the process by which those bugs are systematically exterminated before they have a chance to cause a paper retraction. In software tests, just like in device calibration, expected results are compared with observed results in order to establish accuracy.
(...) Read more...

Licence: Other (Attribution)

Keywords: alpha, carpentries-incubator, english, lesson, programming, python

Resource type: Github Page

Status: Active

Prerequisites:

Nothing to do: you’re ready to go!

Date created: 2015-10-31

Date modified: 2025-08-31

Date published: 2022-07-30

Contributors: gvwilson, katyhuff, fmichonneau, dejmail, abought, abbycabs, markcmiller86, rgaiacs, wking, aaren, lexnederbragt, twitwi, anelda, tbekolay, jdblischak, pbanaszkiewicz, bast, jpallen, andreww, bkatiemills, pipitone, katrinleinweber, konrad, synesthesiam, petebachant, evanwill, gdevenyi, jduckles, mstimberg, jiffyclub


Activity log