no-repeated-test-body
Substantial sibling pytest tests repeat the same structural body.
Why
Copy-pasted tests drift independently and obscure the input dimension that changes behavior.
Fix
Parameterize literal-varying copies with descriptive ids when they exercise one contract; correct or remove verbatim copies that never received their intended edit.
Examples
def test_starts_job(): job = build_job() job.run() assert job.done
def test_stops_job(): job = build_job() job.run() assert job.donedef test_delete_environment(): response = client.delete("/api/environments/3/") result = response.json() assert result["ok"]
def test_delete_schedule(): response = client.delete("/api/schedules/3/") result = response.json() assert result["ok"]def test_parse_one(): result = parse("a") assert result == 1
def test_parse_two(): result = parse("b") assert result == 2
def test_parse_three(): result = parse("c") assert result == 3import pytest
@pytest.mark.parametrize("role", ["admin", "editor"], ids=["admin", "editor"])def test_can_delete(role): user = make_user(role) allowed = can_delete(user) assert allowedFormerly: duplicate-test-body