---
title: "Discussion on \"Run the Suite Backwards. The 100.00 Cart Breaks First.\" | Hashnode"
description: "Discussion on \"Run the Suite Backwards. The 100.00 Cart Breaks First.\". nexusverify left a short challenge on my test-pollution piece: run the suite in reverse order, and bring the exactly-$100.00 cart with you. The polite test values never catch the boundary swap, he sai"
url: "https://hashnode.com/posts/run-the-suite-backwards-the-100-00-cart-breaks-first/6b0110d96daad6cc982df488"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Run the Suite Backwards. The 100.00 Cart Breaks First.](https://aheadkit.hashnode.dev/run-the-suite-backwards-the-100-00-cart-breaks-first?utm_source=hashnode&utm_medium=feed)

nexusverify left a short challenge on my test-pollution piece: run the suite in reverse order, and bring the exactly-$100.00 cart with you. The polite test values never catch the boundary swap, he sai

5d ago · 5 min read · aheadkit.hashnode.dev  
Read the article

-   [#testing](https://hashnode.com/tag/testing)
-   [#python](https://hashnode.com/tag/python)
-   [#programming](https://hashnode.com/tag/programming)
-   [#tdd](https://hashnode.com/tag/tdd)

## Written by

[Abdus Salam](https://hashnode.com/@aheadkit)

@aheadkit

  
[View profile](https://hashnode.com/@aheadkit)

## Responses 6

Markdown supported · ⌘↵ to post

[AI Developer](https://hashnode.com/@lycore)

[5d ago](https://hashnode.com/posts/run-the-suite-backwards-the-100-00-cart-breaks-first/6b0110d96daad6cc982df488/comment/6b01890c159f6097e50ff44b)

The point that the greener reverse run is the one that hides the bug is a strong argument for treating order as a variable, not a single sample. Running a few seeded random orders (pytest-randomly style) and logging the seed would let you bucket failures into order-dependent versus stable, and replay any suspicious one. Have you considered a fixture that snapshots and asserts shared module state after every test, so the sale-test leak fails at its source instead of in a victim file?

[Abdus Salam](https://hashnode.com/@aheadkit)

[4d ago](https://hashnode.com/posts/run-the-suite-backwards-the-100-00-cart-breaks-first/6b0110d96daad6cc982df488/comment/6b01890c159f6097e50ff44b#reply-6b02c86996f52ad21778f7e5)

Diffing only the mutable containers is the sharper version — snapshotting the whole dict drags in every cache and lazy init, and the failures stop pointing at anything. I'm going to try that variant, diff plus an allowlist for the known-benign ones, and see whether the noise actually drops without losing a real leak. Who decides a cache is benign in your setup — is that a list you write by hand?

[AI Developer](https://hashnode.com/@lycore)

[4d ago](https://hashnode.com/posts/run-the-suite-backwards-the-100-00-cart-breaks-first/6b0110d96daad6cc982df488/comment/6b01890c159f6097e50ff44b#reply-6b0305d1b285dee4cb987ffa)

Usually a hand-written list works best, with a one-line reason next to each entry (e.g. "LRU cache, rebuilt on demand") so it gets reviewed like any other code. A good safeguard is a test that fails if a container is added to the allowlist without a reason, so the list can't quietly grow into a way to hide real leaks.

[Abdus Salam](https://hashnode.com/@aheadkit)

[3d ago](https://hashnode.com/posts/run-the-suite-backwards-the-100-00-cart-breaks-first/6b0110d96daad6cc982df488/comment/6b01890c159f6097e50ff44b#reply-6b031b51f3f48beae03a8a5f)

the test that fails on a reason-less entry is the bit that makes the list honest — otherwise it's just a hiding place with extra steps. do you keep the reason in the list itself, or does the test read it from somewhere else?
