Add tests
This commit is contained in:
@@ -87,6 +87,9 @@ SERP_TEST_EXCLUDES = [
|
||||
"data:image/svg+xml,%3Csvg%20width%3D",
|
||||
]
|
||||
|
||||
GITHUB_ISSUE_URL = "https://github.com/microsoft/autogen/issues/1421"
|
||||
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN", "")
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
skip_remote,
|
||||
@@ -179,8 +182,22 @@ def test_markitdown_exiftool() -> None:
|
||||
assert target in result.text_content
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
not GITHUB_TOKEN,
|
||||
reason="GitHub token not provided",
|
||||
)
|
||||
def test_markitdown_github_issue() -> None:
|
||||
markitdown = MarkItDown()
|
||||
result = markitdown.convert_github_issue(GITHUB_ISSUE_URL, GITHUB_TOKEN)
|
||||
print(result.text_content)
|
||||
assert "User-Defined Functions" in result.text_content
|
||||
assert "closed" in result.text_content
|
||||
assert "Comments:" in result.text_content
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
"""Runs this file's tests from the command line."""
|
||||
test_markitdown_remote()
|
||||
test_markitdown_local()
|
||||
test_markitdown_exiftool()
|
||||
test_markitdown_github_issue()
|
||||
|
||||
Reference in New Issue
Block a user