Commit 5a4854d
🧪 Add unit tests for Labels string parsing (#45)
* 🧪 Add unit tests for Labels string parsing and fix edge cases
- Added unit tests for `Labels.parse` covering multiple labels, single labels, empty strings, and multiple spaces.
- Fixed `Labels.parse` to gracefully handle empty strings and redundant whitespace.
- Added a `conftest.py` in the new test directory to mock missing dependencies in restricted environments.
Co-authored-by: rnovatorov <[email protected]>
* 🧪 Remove unnecessary conftest.py mocking
As requested, removed the `conftest.py` file that was mocking dependencies, as they are expected to be installed in the environment.
Co-authored-by: rnovatorov <[email protected]>
* 🧪 Simplify Labels.parse implementation
Switched to using `s.split()` which more cleanly handles empty strings and multiple spaces compared to the previous explicit checks.
Co-authored-by: rnovatorov <[email protected]>
* 🧪 Restore original Labels.parse implementation and update tests
Reverted the simplification of `Labels.parse` to its original state as requested, and updated the unit tests to match this behavior.
Co-authored-by: rnovatorov <[email protected]>
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent c5736c9 commit 5a4854d
1 file changed
+16
-0
lines changedLines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments