8000 Fix Failing `file_size` Tests (#3906) · guillemap/python-telegram-bot@eaf802e · GitHub
[go: up one dir, main page]

Skip to content

Commit eaf802e

Browse files
authored
Fix Failing file_size Tests (python-telegram-bot#3906)
1 parent 1ef242a commit eaf802e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/_files/test_photo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ def test_expected_values(self, photo, thumb):
9999
assert photo.file_size in self.file_size
100100
assert thumb.width == 90
101101
assert thumb.height == 90
102-
assert thumb.file_size == 1477
102+
# File sizes don't seem to be consistent, so we use the values that we have observed
103+
# so far
104+
assert thumb.file_size in [1475, 1477]
103105

104106
def test_de_json(self, bot, photo):
105107
json_dict = {

tests/_files/test_sticker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class TestStickerBase:
103103
file_size = 39518
104104
thumb_width = 319
105105
thumb_height = 320
106-
thumb_file_size = 21472
106+
thumb_file_size = 21448
107107
type = Sticker.REGULAR
108108
custom_emoji_id = "ThisIsSuchACustomEmojiID"
109109
needs_repainting = True

0 commit comments

Comments
 (0)
0