SpecSheriff
rule · _guidelines/tools/9 · s-zrsc6asgmhv8tnc

How a test declares the rule it verifies

Checkedconfirmed by its owner

In TypeScript and JavaScript a test declares the sid of what it verifies by opening its name with it: test("s-… what it verifies", …). In Python it declares it by a mark on the test, @pytest.mark.spec("s-…"); the plugin for pytest of the SpecSheriff tools, pytest-specsheriff, registers the mark and opens the name a run reports with the sid. The description of a further language says how a test declares its sid there.

Why

A test's name is a string in TypeScript and JavaScript, which a sid can open; a Python test is named by its function, which cannot hold a hyphen, so the sid goes into a mark, and the plugin puts it where a run's report shows it.

The links it makes

The decisions taken on it

2026-10-27 · textual
Problem

A test bound to its rule by the opening of its name cannot be written in Python, whose names cannot hold a hyphen.

Ruling

The owner: in Python a test declares its sid by a mark on it; each language's description says how a test declares its sid there.

The tests bound to it