Commit e1d6beb
Fix DictNoneTest Test 6: len() rejection is an error, not a diagnostic (#1035)
Test 6 (len() on a class without __len__) was always broken since its
introduction in PR #761 (bb11e70). The test expected processPythonFile
to return diagnostics, but the len() rejection throws a TranslationError
in PythonToLaurel.lean, which withPythonToLaurel converts to an IO.Error
before the diagnostic stage is reached.
The test was never caught because:
1. It was authored in an environment without Python, so withPython
skipped and #guard_msgs saw empty output (matching the empty docstring).
2. DictNoneTest was not in CI's explicit Python test list in ci.yml, so
it was never run in CI either.
Fix: catch the IO.Error and verify it contains the expected message, and
add DictNoneTest to CI's Python test list.
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
---------
Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
Co-authored-by: Remy Willems <rwillems@amazon.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 84c6418 commit e1d6beb
2 files changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
0 commit comments