Commit 8263fc3
committed
Add unit tests covering every FragmentFilename branch
Fill the remaining coverage gaps so every public property and every
private branch of the new value object is hit by a focused test:
- test_fragment_filename_slug_and_tier: one case per tier (patch /
minor / major / skip), plus the dotted-slug and 'no match'
outcomes — covers .slug and .tier for both populated and None
paths.
- test_fragment_filename_validity_and_kind: 4-row grid asserting
the .is_valid / .is_fragment / .is_skip flags stay consistent
with each other across fragments, skips, and unparseable names.
- test_fragment_filename_rejects_forbidden_chars: parametrized over
every character in FragmentFilename._FORBIDDEN_CHARS plus a
representative ASCII control char and DEL, so each character is
covered individually rather than relying on collective coverage
from a few example slugs.
- test_fragment_filename_rejects_structural_edge_cases: empty
filename, suffix-only filenames (slug would be empty), and the
'@{' substring git refnames forbid.
- test_fragment_filename_suffixes_are_canonical: pins the SUFFIXES
class attribute to the exact tuple it must remain — the wire
format for fragment filenames is part of the contract.1 parent f06e52b commit 8263fc3
1 file changed
Lines changed: 84 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
141 | 225 | | |
142 | 226 | | |
143 | 227 | | |
| |||
0 commit comments