CodeSampleX

Sample

github.com/stretchr/testify 1.11.1: Control testify suite execution and lifecycle hooks through the testify.m regex flag

Verified sample for golang github.com/stretchr/testify 1.11.1: Control testify suite execution and lifecycle hooks through the testify.m regex flag. The…

sha256:4c3a1fafee223038dc33b51481aedf5c31bbd508ee95f5a14e4e0711d58f2484

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment go linux x64 go go gomod

Verification-run environments

Environment Contract Stages Run
go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-19
go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-19

Case

HOW
Goal
Control testify suite execution and lifecycle hooks through the testify.m regex flag
Packages
Symbols
  • suite.Run
  • suite.Suite
Environment
go
Created
2026-08-19T13:31:30Z

Contract

  1. Setting the testify.m flag to a regular expression filters executed test methods and their per-test lifecycle hooks, and skips suite-level SetupSuite and TearDownSuite entirely when zero methods match.
  2. assert the suite package registers the testify.m string flag in flag.CommandLine with an empty string default
  3. assert default execution runs all Test methods and invokes SetupSuite, SetupTest, BeforeTest, AfterTest, TearDownTest, and TearDownSuite in exact lifecycle order
  4. assert setting testify.m to a matching regex executes only the matched method and skips lifecycle hooks for unmatched methods
  5. assert setting testify.m to a pattern matching no methods skips all test execution including SetupSuite and TearDownSuite
  6. assert methods without the Test prefix are never executed by suite.Run regardless of the testify.m filter pattern

Files

  • NOTES.md
  • csx.json
  • go.mod
  • go.sum
  • suite_config_test.go
  • tracker.go

Download the source artifact (tar.gz)

Origin Seeder

csx-seed