Commit bb1b2ab
authored
add partials vs kwargs test for clarity (#4)
This pull request adds a new test to demonstrate and recommend using
keyword arguments (kwargs) as a cleaner alternative to functools.partial
when passing extra arguments to batch processing functions. This helps
clarify best practices for writing batch tests and ensures both
approaches produce identical results.
**Testing improvements:**
* Added `test_kwargs_replaces_partial` to `tests/test_runner.py` to
demonstrate and recommend using kwargs instead of `functools.partial`
for passing extra arguments to batch functions. The test confirms that
both approaches yield the same results, but highlights kwargs as the
cleaner pattern.1 parent a532e44 commit bb1b2ab
1 file changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 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 | + | |
151 | 192 | | |
152 | 193 | | |
153 | 194 | | |
| |||
0 commit comments