Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Failing Tests by Making Them Independent#4494

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 1 commit intomasterfromfix-tests
Sep 21, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletionstests/test_bot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2863,10 +2863,13 @@ async def test_edit_message_text_entities(self, bot, message):
assert message.entities == tuple(entities)

@pytest.mark.parametrize("default_bot", [{"parse_mode": "Markdown"}], indirect=True)
async def test_edit_message_text_default_parse_mode(self, default_bot,message):
async def test_edit_message_text_default_parse_mode(self, default_bot,chat_id):
test_string = "Italic Bold Code"
test_markdown_string = "_Italic_ *Bold* `Code`"

# can't use `message` fixture as that would change its value
message = await default_bot.send_message(chat_id, "dummy text")

message = await default_bot.edit_message_text(
text=test_markdown_string,
chat_id=message.chat_id,
Expand DownExpand Up@@ -2937,10 +2940,16 @@ async def test_edit_message_caption_entities(self, bot, media_message):
# edit_message_media is tested in test_inputmedia

@pytest.mark.parametrize("default_bot", [{"parse_mode": "Markdown"}], indirect=True)
async def test_edit_message_caption_default_parse_mode(self, default_bot,media_message):
async def test_edit_message_caption_default_parse_mode(self, default_bot,chat_id):
test_string = "Italic Bold Code"
test_markdown_string = "_Italic_ *Bold* `Code`"

# can't use `media_message` fixture as that would change its value
with data_file("telegram.ogg").open("rb") as f:
media_message = await default_bot.send_voice(
chat_id, voice=f, caption="my caption", read_timeout=10
)

message = await default_bot.edit_message_caption(
caption=test_markdown_string,
chat_id=media_message.chat_id,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp