mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-17 04:39:55 +01:00
Fix windows actions (#1605)
* Stop testing with ujson * Fix timing issue with test_delete_message * ignore pip deprecation warning. hopefully it will fix windows+py2.7 * telegram replies to deleteing old messages are not consistent
This commit is contained in:
parent
8b4b22cc89
commit
e9d9f01bd4
2 changed files with 6 additions and 6 deletions
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
|
@ -33,11 +33,10 @@ jobs:
|
|||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -U codecov pytest-cov
|
||||
pip install ujson
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements-dev.txt
|
||||
python -W ignore -m pip install --upgrade pip
|
||||
python -W ignore -m pip install -U codecov pytest-cov
|
||||
python -W ignore -m pip install -r requirements.txt
|
||||
python -W ignore -m pip install -r requirements-dev.txt
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
|
|
|
@ -114,13 +114,14 @@ class TestBot(object):
|
|||
@pytest.mark.timeout(10)
|
||||
def test_delete_message(self, bot, chat_id):
|
||||
message = bot.send_message(chat_id, text='will be deleted')
|
||||
time.sleep(2)
|
||||
|
||||
assert bot.delete_message(chat_id=chat_id, message_id=message.message_id) is True
|
||||
|
||||
@flaky(3, 1)
|
||||
@pytest.mark.timeout(10)
|
||||
def test_delete_message_old_message(self, bot, chat_id):
|
||||
with pytest.raises(TelegramError, match='Message to delete not found'):
|
||||
with pytest.raises(BadRequest):
|
||||
# Considering that the first message is old enough
|
||||
bot.delete_message(chat_id=chat_id, message_id=1)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue