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

Refactor Tests forTelegramObject Classes with Subclasses#4654

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 11 commits intomasterfromchore/#4652-menubutton
Feb 6, 2025

Conversation

Bibo-Joshi
Copy link
Member

@Bibo-JoshiBibo-Joshi commentedJan 19, 2025
edited
Loading

closes#4652

@Bibo-JoshiBibo-Joshi added the 🛠 refactorchange type: refactor labelJan 19, 2025
@Bibo-JoshiBibo-Joshi added the ⚙️ testsaffected functionality: tests labelJan 19, 2025
@Bibo-JoshiBibo-Joshi changed the titleRefactor Tests forMenuButtonRefactor Tests forTelegramObject Classes with SubclassesJan 19, 2025
@Bibo-JoshiBibo-Joshi marked this pull request as draftJanuary 19, 2025 16:19
@codecovCodecov
Copy link

codecovbot commentedJan 19, 2025
edited
Loading

❌ 3 Tests Failed:

Tests completedFailedPassedSkipped
650236499675
View the top 3 failed tests by shortest run time
tests._files.test_animation.TestAnimationWithoutRequest::test_expected_values
Stack Traces | 0.002s run time
self=<tests._files.test_animation.TestAnimationWithoutRequestobjectat0x107399c40>animation=Animation(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATXnTGeNRiqItC7_4j2V1BlU1eZtD7qjAALAGgACrWppUJqwnZXw6InBAQAHcw...LAGgACrWppUJqwnZXw6InBAQAHcwADNgQ',file_size=2744,file_unique_id='AQADwBoAAq1qaVB4',height=50,width=50),width=640)deftest_expected_values(self,animation):>assertanimation.mime_type==self.mime_typeEAssertionError:assert'image/gif'=='video/mp4'EE-video/mp4E+image/giftests/_files/test_animation.py:69:AssertionError
tests._files.test_animation.TestAnimationWithRequest::test_send_animation_url_file
Stack Traces | 0.221s run time
self=<tests._files.test_animation.TestAnimationWithRequestobjectat0x107399b80>bot=PytestExtBot[token=629326538:AAFRrZJrB7oB3muzGsGJXUvGE5CQzM5CU4o]chat_id='675666224'animation=Animation(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATXnTGeNRiqItC7_4j2V1BlU1eZtD7qjAALAGgACrWppUJqwnZXw6InBAQAHcw...LAGgACrWppUJqwnZXw6InBAQAHcwADNgQ',file_size=2744,file_unique_id='AQADwBoAAq1qaVB4',height=50,width=50),width=640)asyncdeftest_send_animation_url_file(self,bot,chat_id,animation):message=awaitbot.send_animation(chat_id=chat_id,animation=self.animation_file_url,caption=self.caption        )assertmessage.caption==self.captionassertisinstance(message.animation,Animation)assertisinstance(message.animation.file_id,str)assertisinstance(message.animation.file_unique_id,str)assertmessage.animation.file_idassertmessage.animation.file_unique_id>assertmessage.animation.duration==animation.durationEAssertionError:assert1==0E+where1=Animation(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ','file_unique_id':'AQADNwEAAqrMPVNy','file_size':4451,'width':320,'height':180}},duration=1,file_id='CgACAgQAAxkDAAE1TNpnc0T0TcZdR4Sqb_r1u5XOTn1iJgACNwEAAqrMPVMUveVgZ_74JjYE',file_name='game.gif.mp4',file_size=4127,file_unique_id='AgADNwEAAqrMPVM',height=180,mime_type='video/mp4',thumbnail=PhotoSize(file_id='AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ',file_size=4451,file_unique_id='AQADNwEAAqrMPVNy',height=180,width=320),width=320).durationE+whereAnimation(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ','file_unique_id':'AQADNwEAAqrMPVNy','file_size':4451,'width':320,'height':180}},duration=1,file_id='CgACAgQAAxkDAAE1TNpnc0T0TcZdR4Sqb_r1u5XOTn1iJgACNwEAAqrMPVMUveVgZ_74JjYE',file_name='game.gif.mp4',file_size=4127,file_unique_id='AgADNwEAAqrMPVM',height=180,mime_type='video/mp4',thumbnail=PhotoSize(file_id='AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ',file_size=4451,file_unique_id='AQADNwEAAqrMPVNy',height=180,width=320),width=320)=Message(animation=Animation(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ','file_unique_id':'AQADNwEAAqrMPVNy','file_size':4451,'width':320,'height':180}},duration=1,file_id='CgACAgQAAxkDAAE1TNpnc0T0TcZdR4Sqb_r1u5XOTn1iJgACNwEAAqrMPVMUveVgZ_74JjYE',file_name='game.gif.mp4',file_size=4127,file_unique_id='AgADNwEAAqrMPVM',height=180,mime_type='video/mp4',thumbnail=PhotoSize(file_id='AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ',file_size=4451,file_unique_id='AQADNwEAAqrMPVNy',height=180,width=320),width=320),caption='Test *animation*',channel_chat_created=False,chat=Chat(first_name='PTB',id=675666224,last_name='Test user',type=<ChatType.PRIVATE>),date=datetime.datetime(2025,1,19,18,36,39,tzinfo=datetime.timezone.utc),delete_chat_photo=False,document=Document(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ','file_unique_id':'AQADNwEAAqrMPVNy','file_size':4451,'width':320,'height':180}},file_id='CgACAgQAAxkDAAE1TNpnc0T0TcZdR4Sqb_r1u5XOTn1iJgACNwEAAqrMPVMUveVgZ_74JjYE',file_name='game.gif.mp4',file_size=4127,file_unique_id='AgADNwEAAqrMPVM',mime_type='video/mp4',thumbnail=PhotoSize(file_id='AAMCBAADGQMAATVM2mdzRPRNxl1HhKpv-vW7lc5OfWImAAI3AQACqsw9UxS95WBn_vgmAQAHbQADNgQ',file_size=4451,file_unique_id='AQADNwEAAqrMPVNy',height=180,width=320)),from_user=User(first_name='PTB tests on Travis using CPython 3.5',id=629326538,is_bot=True,username='ptb_travis_cpython_35_bot'),group_chat_created=False,message_id=3532629,supergroup_chat_created=False).animationE+and0=Animation(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATXnTGeNRiqItC7_4j2V1BlU1eZtD7qjAALAGgACrWppUJqwnZXw6InBAQAHcwADNgQ','file_unique_id':'AQADwBoAAq1qaVB4','file_size':2744,'width':50,'height':50}},duration=0,file_id='CgACAgQAAxkDAAE150xnjUYqiLQu_-I9ldQZVNXmbQ-6owACwBoAAq1qaVCasJ2V8OiJwTYE',file_name='game.gif',file_size=36535,file_unique_id='AgADwBoAAq1qaVA',height=360,mime_type='image/gif',thumbnail=PhotoSize(file_id='AAMCBAADGQMAATXnTGeNRiqItC7_4j2V1BlU1eZtD7qjAALAGgACrWppUJqwnZXw6InBAQAHcwADNgQ',file_size=2744,file_unique_id='AQADwBoAAq1qaVB4',height=50,width=50),width=640).durationtests/_files/test_animation.py:271:AssertionError
tests._files.test_animation.TestAnimationWithRequest::test_send_all_args
Stack Traces | 0.621s run time
self=<tests._files.test_animation.TestAnimationWithRequestobjectat0x1073b69d0>bot=PytestExtBot[token=629326538:AAFRrZJrB7oB3muzGsGJXUvGE5CQzM5CU4o]chat_id='675666224'animation_file=<_io.BufferedReadername='.../tests/data/game.gif'>animation=Animation(api_kwargs={'thumb': {'file_id':'AAMCBAADGQMAATXnTGeNRiqItC7_4j2V1BlU1eZtD7qjAALAGgACrWppUJqwnZXw6InBAQAHcw...LAGgACrWppUJqwnZXw6InBAQAHcwADNgQ',file_size=2744,file_unique_id='AQADwBoAAq1qaVB4',height=50,width=50),width=640)thumb_file=<_io.BufferedReadername='.../tests/data/thumb.jpg'>asyncdeftest_send_all_args(self,bot,chat_id,animation_file,animation,thumb_file):message=awaitbot.send_animation(chat_id,animation_file,duration=self.duration,width=self.width,height=self.height,caption=self.caption,parse_mode="Markdown",disable_notification=False,protect_content=True,thumbnail=thumb_file,has_spoiler=True,show_caption_above_media=True,        )assertisinstance(message.animation,Animation)assertisinstance(message.animation.file_id,str)assertisinstance(message.animation.file_unique_id,str)assertmessage.animation.file_idassertmessage.animation.file_unique_id>assertmessage.animation.file_name==animation.file_nameEAssertionError:assert'game.gif.mp4'=='game.gif'EE-game.gifE+game.gif.mp4E         ?++++tests/_files/test_animation.py:237:AssertionError

To view more test analytics, go to theTest Analytics Dashboard
📢 Thoughts on this report?Let us know!

@Bibo-JoshiBibo-Joshi marked this pull request as ready for reviewJanuary 19, 2025 18:22
@Bibo-JoshiBibo-Joshi merged commitf9f1533 intomasterFeb 6, 2025
24 checks passed
@Bibo-JoshiBibo-Joshi deleted the chore/#4652-menubutton branchFebruary 6, 2025 11:46
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 14, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@harshil21harshil21Awaiting requested review from harshil21

@PoolitzerPoolitzerAwaiting requested review from Poolitzer

Assignees
No one assigned
Labels
🛠 refactorchange type: refactor⚙️ testsaffected functionality: tests
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Split Tests for Classes with Subclass-de_json
1 participant
@Bibo-Joshi

[8]ページ先頭

©2009-2025 Movatter.jp