Skip to content

Commit 7777b24

Browse files
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/vitest-coverage-excluded-files
2 parents 63c475a + b0c4e1f commit 7777b24

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

tests/test_languages/test_language_parity.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -440,25 +440,19 @@ def test_async_functions_discovery(self, python_support, js_support):
440440
assert js_sync.is_async is False, "JavaScript sync function should have is_async=False"
441441

442442
def test_nested_functions_discovery(self, python_support, js_support):
443-
"""Python skips nested functions; JavaScript discovers them with parent info."""
443+
"""Both Python and JavaScript skip nested functions — only outer is discovered."""
444444
py_file = write_temp_file(NESTED_FUNCTIONS.python, ".py")
445445
js_file = write_temp_file(NESTED_FUNCTIONS.javascript, ".js")
446446

447447
py_funcs = python_support.discover_functions(py_file.read_text(encoding="utf-8"), py_file)
448448
js_funcs = js_support.discover_functions(js_file.read_text(encoding="utf-8"), js_file)
449449

450-
# Python skips nested functions — only outer is discovered
450+
# Both skip nested functions — only outer is discovered
451451
assert len(py_funcs) == 1, f"Python found {len(py_funcs)}, expected 1"
452452
assert py_funcs[0].function_name == "outer"
453453

454-
# JavaScript discovers both
455-
assert len(js_funcs) == 2, f"JavaScript found {len(js_funcs)}, expected 2"
456-
js_names = {f.function_name for f in js_funcs}
457-
assert js_names == {"outer", "inner"}, f"JavaScript found {js_names}"
458-
459-
js_inner = next(f for f in js_funcs if f.function_name == "inner")
460-
assert len(js_inner.parents) >= 1, "JavaScript inner should have parent info"
461-
assert js_inner.parents[0].name == "outer", "JavaScript inner's parent should be outer"
454+
assert len(js_funcs) == 1, f"JavaScript found {len(js_funcs)}, expected 1"
455+
assert js_funcs[0].function_name == "outer"
462456

463457
def test_static_methods_discovery(self, python_support, js_support):
464458
"""Both should discover static methods."""

0 commit comments

Comments
 (0)