Practice question · Numerical answer
A test suite contains 40 unit tests, of which 36 passed before a change. The change makes 3 previously passing tests fail and fixes 1 previously failing test. How many tests pass now?
Hints
- Start from 36, then apply both effects of the change.
- Three fewer passes, one more pass.
Show the answer
34
Why
36 - 3 + 1 = 34. The net loss of two hides the fact that something was also fixed, which is exactly why the suite reports individual test names rather than a single score.
Practise Reproducibility and Good Practice
The app has 5 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.
More questions on Reproducibility and Good Practice
- A NumPy vectorised operation and an equivalent Python loop compute identical results, and the vectorised one…
- A colleague sends a script and the number it printed. Select everything you still need before that result can…
- Vectorising usually gives a large speed-up, but sometimes almost none. Why does replacing a loop with an…
- Two runs of the same simulation with the same fixed seed and the same library versions should produce…
- Sort each practice by its effect on reproducibility.
- Complete the purpose of a test suite.
- Order the steps of putting an analysis on a reproducible footing.