Skip to content

Rewrite test directory and add github workflow to run test#43

Merged
KavyaSree2610 merged 18 commits intomainfrom
kkaitepalli/tests
Oct 10, 2025
Merged

Rewrite test directory and add github workflow to run test#43
KavyaSree2610 merged 18 commits intomainfrom
kkaitepalli/tests

Conversation

@KavyaSree2610
Copy link
Copy Markdown
Collaborator

No description provided.

@KavyaSree2610 KavyaSree2610 changed the title Rewrite test directory Rewrite test directory and add github workflow to run test Oct 6, 2025
@KavyaSree2610 KavyaSree2610 marked this pull request as ready for review October 6, 2025 10:30
Comment thread src/microbots/tools/tool_definitions/browser-use/browser.py Outdated
Comment thread .github/workflows/test.yml
Comment thread src/microbots/environment/local_docker/image_builder/ShellCommunicator.py Outdated
Comment thread src/microbots/environment/local_docker/LocalDockerEnvironment.py
Comment thread src/microbots/tools/tool_definitions/browser-use/browser.py Outdated
"""Test LogAnalysisBot analyzing calculator log file"""
# Ensure the log file exists
if not log_file.exists():
pytest.skip(f"Log file not found: {log_file}")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It should be failure not skip.

# Check if calculator.log exists
calc_log = calculator_data_dir / "calculator.log"
if not calc_log.exists():
pytest.skip(f"Calculator log file not found: {calc_log}")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be a failure too

Comment thread test/bot/calculator/test_writing_bot.py Outdated
calc_content = calc_file.read_text()

# Check that the fix was applied (should contain some form of zero check)
assert "b == 0" in calc_content or "b != 0" in calc_content or "if not b" in calc_content or "if b == 0" in calc_content, \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is method is not very accurate.
To verify the fix, let's just run the calculator.py and see whether it runs successfully.

assert "b == 0" in calc_content or "b != 0" in calc_content or "if not b" in calc_content or "if b == 0" in calc_content, \
"Calculator code should contain a check for division by zero"

logger.info(f"Fixed calculator.py content preview: {calc_content[:500]}...")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, please print the diff after running the WritingBot.

@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Copy Markdown
Member

@0xba1a 0xba1a left a comment

Choose a reason for hiding this comment

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

Merging this PR considering it only for adding GitHub Actions. Test case related fixes will be done in separate PRs.

@0xba1a 0xba1a requested review from shivashanmugam and removed request for shivashanmugam October 9, 2025 15:46
@KavyaSree2610 KavyaSree2610 merged commit ea4d42e into main Oct 10, 2025
2 checks passed
@KavyaSree2610 KavyaSree2610 deleted the kkaitepalli/tests branch February 18, 2026 10:59
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.

4 participants