Commit 2e59a30
committed
Test: Refactor test__exclude_common_contents__single with fixtures
This commit refactors the `test__exclude_common_contents__single` test to use pytest fixtures for improved organization, readability, and maintainability.
The following fixtures are introduced:
- `start_marker`: Provides the start marker string.
- `end_marker`: Provides the end marker string.
- `common_lines`: Provides a tuple of common code lines.
- `specific_lines`: Provides a tuple of specific code lines.
- `common_content_single`: Generates the common content string using the `start_marker`, `common_lines`, and `end_marker` fixtures.
- `readme_content_single`: Generates the complete README content using the `specific_lines` and `common_content_single` fixtures.
These fixtures make the test setup more modular and easier to understand. They also promote code reuse and make it easier to modify the test data if needed.
The test function now takes these fixtures as arguments, making the test logic more concise and focused. The assertions are also updated to use the fixtures, improving readability and maintainability.
add typehints for test__exclude_common_contents__single()1 parent b7fef4a commit 2e59a30
1 file changed
Lines changed: 71 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
306 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
307 | 341 | | |
308 | | - | |
| 342 | + | |
309 | 343 | | |
310 | 344 | | |
311 | 345 | | |
312 | 346 | | |
313 | | - | |
314 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
315 | 358 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 359 | + | |
| 360 | + | |
320 | 361 | | |
321 | 362 | | |
322 | 363 | | |
| |||
0 commit comments