---
title: "Iterate, get the tests green"
description: "A `calc.py` with three planted bugs and a `test_calc.py` with three assertions that catch them. Used by `CMA_iterate_fix_failing_tests.py`."
type: skill
canonical_url: https://claudary.paisolsolutions.com/skills/readme-47
source: "Claudary"
difficulty: intermediate
author: "Claude Code Knowledge Pack"
date: 2026-07-10T11:36:34.744Z
license: CC-BY-4.0
attribution: "Iterate, get the tests green — Claudary (https://claudary.paisolsolutions.com/skills/readme-47)"
---

# Iterate, get the tests green
A `calc.py` with three planted bugs and a `test_calc.py` with three assertions that catch them. Used by `CMA_iterate_fix_failing_tests.py`.

## Overview

# Iterate, get the tests green

A `calc.py` with three planted bugs and a `test_calc.py` with three assertions that catch them. Used by `CMA_iterate_fix_failing_tests.py`.

The interesting bug is `test_mean`: `mean()` calls `add` and `divide` internally, so it goes green on its own once the other two are fixed. An agent that edits `mean()` directly is over-fixing.

---

Source: [Claudary](https://claudary.paisolsolutions.com/skills/readme-47) · https://claudary.paisolsolutions.com
