One function
TagCounter in scastlara/pytest-tagging
The author described this change as “fix: re-adding sort of tags”. It counts as a record because the check below fails on the code as it stood at 8ec524e17 and passes on 5f3f795f6, with nothing else changed between the two runs.
Projectscastlara/pytest-tagging
Fix saved2022-10-23
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Counter that uses pytest caching module to store the counts
The change
| 15 | 15 | self.counter[tag] = 1 | |
| 16 | 16 | ||
| 17 | 17 | def items(self) -> list[Any]: | |
| 18 | - | return self.counter.items() | |
| 18 | + | return sorted(self.counter.items(), key=lambda x: (x[1], x[0]), reverse=True) | |
| 19 | 19 | ||
| 20 | 20 | def __bool__(self) -> bool: | |
| 21 | 21 | return bool(self.counter) |
The check that tells the two apart
fail→pass·tests/test_utils.py::TestTagCounter::test_sorted_items
Check file tests/test_utils.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it8ec524e1745482863de3509f9065a366cd983001
Broken version dated2022-10-23
Modulepytest_tagging.utils
Units changedTagCounter
Fingerprint9d9cf5c639d5456c
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.