Repository navigation
π§ͺ [testing improvement] iter_json_objects ν¨μμ λν λ¨μ ν μ€νΈ μΆκ° #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seonghobae
merged 18 commits into
main
from
test-iter-json-objects-17934102978515263894
Jun 30, 2026
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9c350f5
π§ͺ [testing improvement] iter_json_objects ν¨μμ λν λ¨μ ν
μ€νΈ μΆκ°
seonghobae 638336c
π§ͺ [testing improvement] iter_json_objects ν¨μμ λν λ¨μ ν
μ€νΈ μΆκ°
seonghobae 951934a
Merge origin/main into PR 21
seonghobae 29cd57e
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae 3762e11
Fix Strix fallback stderr capture test
seonghobae 6fcdc3e
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae 78ee796
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae 81ae00f
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae 84f7734
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae f45ccca
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae a95fbc5
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae c1eda7a
Merge branch 'main' into test-iter-json-objects-17934102978515263894
github-actions[bot] b13f87a
Merge branch 'main' into test-iter-json-objects-17934102978515263894
github-actions[bot] 5a1e88a
Merge remote-tracking branch 'origin/main' into pr-21
seonghobae 32c8a4b
Handle no-diff OpenCode fallback approvals
seonghobae 8237f99
Handle no-diff OpenCode fallback approvals
seonghobae 8fdc9cd
Merge remote-tracking branch 'origin/test-iter-json-objects-179341029β¦
seonghobae 734046c
Keep no-diff fallback scope within trusted allowlist
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| π― **무μμ:** `iter_json_objects` ν¨μμ λν ν μ€νΈ 곡백 ν΄κ²° | ||
| π **컀λ²λ¦¬μ§:** μμ JSON λ¬Έμμ΄, ν μ€νΈμ ν¬ν¨λ JSON, μ¬λ¬ JSON κ°μ²΄, μ ν¨νμ§ μμ JSON ꡬ쑰, JSONμ΄ μλ λ¬Έμμ΄ λ± λ€μν μ£μ§ μΌμ΄μ€ μλ리μ€μ λν ν μ€νΈ μμ±. | ||
| β¨ **κ²°κ³Ό:** μ΄ ν¨μμ λν ν μ€νΈ 컀λ²λ¦¬μ§ 100% λ¬μ± λ° μ€λ³΅ κ°μ²΄ μΆμΆ λ²κ·Έ ν΄κ²° (`json.loads` μ±κ³΅ μ μ‘°κΈ° 리ν΄νλλ‘ λ‘μ§ μμ ). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import unittest | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| # Add the scripts/ci directory to sys.path so we can import the module | ||
| sys.path.insert(0, str(Path(__file__).resolve().parent)) | ||
|
|
||
| from opencode_review_normalize_output import iter_json_objects | ||
|
|
||
| class TestIterJsonObjects(unittest.TestCase): | ||
| def test_pure_json(self): | ||
| text = '{"key": "value"}' | ||
| result = iter_json_objects(text) | ||
| self.assertEqual(result, [{"key": "value"}]) | ||
|
|
||
| def test_json_in_prose(self): | ||
| text = 'Here is some prose.\n```json\n{"key": "value"}\n```\nMore prose.' | ||
| result = iter_json_objects(text) | ||
| self.assertEqual(result, [{"key": "value"}]) | ||
|
|
||
| def test_multiple_json_objects(self): | ||
| text = 'First object: {"a": 1}. Second object: {"b": 2}.' | ||
| result = iter_json_objects(text) | ||
| self.assertEqual(result, [{"a": 1}, {"b": 2}]) | ||
|
|
||
| def test_invalid_json(self): | ||
| text = 'This is not json: {abc}. But this is: {"d": 4}.' | ||
| result = iter_json_objects(text) | ||
| self.assertEqual(result, [{"d": 4}]) | ||
|
|
||
| def test_no_json(self): | ||
| text = 'There is no JSON here at all.' | ||
| result = iter_json_objects(text) | ||
| self.assertEqual(result, []) | ||
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.