Commit acaacc4
authored
Add test for shutil.copy() in test_shutil.py to verify str return type with Path arguments
Adds a unit test to test_shutil.py that ensures shutil.copy() returns a str even when given pathlib.Path objects as arguments. This addresses the inconsistent behavior where shutil.copy() could return a Path when the destination was a Path object.
The test fails on the original implementation and passes with the fix introduced in this PR. This regression test helps enforce consistent return types for shutil functions.1 parent afbf1fa commit acaacc4
1 file changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
3470 | 3471 | | |
3471 | 3472 | | |
3472 | 3473 | | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
3473 | 3493 | | |
3474 | 3494 | | |
3475 | 3495 | | |
| |||
0 commit comments