How a test declares the rule it verifies
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.
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
- 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
- skills/pytest-specsheriff/tests/test_plugin.py · test_a_mark_without_one_sid_is_refused
- skills/pytest-specsheriff/tests/test_plugin.py · test_a_run_reports_a_marked_test_by_a_name_its_sid_opens
- skills/pytest-specsheriff/tests/test_plugin.py · test_an_unmarked_test_keeps_its_name
- skills/pytest-specsheriff/tests/test_plugin.py · test_the_mark_is_registered
- skills/tools/test/unit/code.test.ts · s-zrsc6asgmhv8tnc reads the sid a Python test declares by its mark
- skills/tools/test/unit/code.test.ts · s-zrsc6asgmhv8tnc reads the sid a TypeScript test opens its name with, a template's leading text included