Skip to content

test: add ArxMain edge-case tests#44

Merged
xmnlab merged 3 commits intoarxlang:mainfrom
omsherikar:test/arxmain-full-coverage
Apr 5, 2026
Merged

test: add ArxMain edge-case tests#44
xmnlab merged 3 commits intoarxlang:mainfrom
omsherikar:test/arxmain-full-coverage

Conversation

@omsherikar
Copy link
Copy Markdown
Contributor

Cover default output path, single- and multi-file AST, codegen guard, invalid link_mode, main detection, and show_ast fallbacks.

solves #40

Cover default output path, single- and multi-file AST, codegen guard, invalid link_mode, main detection, and show_ast fallbacks.
Copilot AI review requested due to automatic review settings April 5, 2026 12:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds targeted unit tests to cover previously untested edge-case branches in arx.main.ArxMain, improving line/branch coverage for src/arx/main.py as requested in issue #40.

Changes:

  • Add tests for _resolve_output_file, _get_astx (single-file), _get_codegen_astx multi-module guard, _has_main_entry over Module and Block.
  • Add tests for run() invalid link_mode validation.
  • Add tests for show_ast() error/fallback behavior, including to_json preference and _format_ast_fallback coverage (simple values, cycles, and “exotic” fields).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Satisfy mypy override checks for test AST subclasses; drop unused type ignore.
Use setattr to stub _get_astx for CI mypy strict.
@xmnlab xmnlab merged commit 4d797cd into arxlang:main Apr 5, 2026
9 checks passed
@xmnlab
Copy link
Copy Markdown
Contributor

xmnlab commented Apr 5, 2026

Thanks @omsherikar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants