Skip to content
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

Translator: Improve test_image_translator to use temp_path instead of real path and add tests for markdown translator #55

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

skytin1004
Copy link
Collaborator

@skytin1004 skytin1004 commented Nov 3, 2024

Purpose

  • This update refactors test_image_translator to use a temporary path instead of a real file path, which improves test reliability by isolating test output.

  • Added new tests for markdown_translator

Description

  • Updated ImageTranslator tests to utilize tmp_path fixture for temporary directories in place of hardcoded paths.
  • Enhanced test_translate_image to assert the correct temporary path for translated images, improving isolation and ensuring that temporary data is used during test execution.
  • Added new tests for markdown_translator.

Related Issue

#15

Does this introduce a breaking change?

  • Yes
  • No

Type of change

  • Bugfix
  • Feature
  • Code style update (e.g., formatting, local variables)
  • Refactoring (no functional or API changes)
  • Documentation content changes
  • Other... Please describe:

Checklist

Before submitting your pull request, please confirm the following:

  • I have thoroughly tested my changes: I confirm that I have run the code and manually tested all affected areas.
  • All existing tests pass: I have run all tests and confirmed that nothing is broken.
  • I have added new tests (if applicable): I have written tests that cover the new functionality introduced by my code changes.
  • I have followed the Co-op Translators coding conventions: My code adheres to the style guide and coding conventions outlined in the repository.
  • I have documented my changes (if applicable): I have updated the documentation to reflect the changes where necessary.

Additional context

@skytin1004 skytin1004 added enhancement New feature or request core Related to any changes in core source files labels Nov 3, 2024
@skytin1004 skytin1004 self-assigned this Nov 3, 2024
@github-actions github-actions bot changed the title Improve test_image_translator to use temp_path instead of real path and add tests for markdown translator Translator: Improve test_image_translator to use temp_path instead of real path and add tests for markdown translator Nov 3, 2024
@github-actions github-actions bot added tests and removed core Related to any changes in core source files labels Nov 3, 2024
@skytin1004
Copy link
Collaborator Author

I have reviewed the changes and everything looks good.

@skytin1004 skytin1004 merged commit 9415e22 into Azure:main Nov 3, 2024
4 checks passed
@skytin1004 skytin1004 deleted the test branch November 3, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant