Commit b713dcd
Fix CI: commit operation equality (hfh 1.20.0) and pytest parametrize collection error (#8283)
Fix CI: huggingface_hub 1.20.0 commit op equality + pytest parametrize
Two unrelated CI failures:
1. tests/test_hub.py::test_delete_from_hub
Since huggingface_hub 1.20.0 (huggingface/huggingface_hub#4331),
`UploadInfo` is no longer a dataclass and `CommitOperationAdd`/`CommitOperationDelete`
no longer implement value equality. Two operations with identical content are therefore
not equal anymore, breaking the `operations == expected_operations` assertion. Compare
operations attribute by attribute instead. This is a breaking change in huggingface_hub
that will not be reverted upstream.
2. tests/test_load.py collection error
A trailing comma in `@pytest.mark.parametrize("stream_from_cache, ", ...)` made recent
pytest parse it as two argnames, raising `TypeError: object of type 'bool' has no len()`
at collection time. Drop the trailing comma.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 06fcc08 commit b713dcd
2 files changed
Lines changed: 25 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
| 924 | + | |
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| |||
0 commit comments