Title: [REFACTOR] Split test classes into two: `TestXXXNoRequest` & `TestXXXRequest` · Issue #3407 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [REFACTOR] Split test classes into two: `TestXXXNoRequest` & `TestXXXRequest` · Issue #3407 · python-telegram-bot/python-telegram-bot
X Title: [REFACTOR] Split test classes into two: `TestXXXNoRequest` & `TestXXXRequest` · Issue #3407 · python-telegram-bot/python-telegram-bot
Description: Currently each of our test files has about one TestClass, which tests everything about the class together. This is not optimal because: Some tests in the class make actual requests to Telegram, thus slowing down development if you've mad...
Open Graph Description: Currently each of our test files has about one TestClass, which tests everything about the class together. This is not optimal because: Some tests in the class make actual requests to Telegram, thu...
X Description: Currently each of our test files has about one TestClass, which tests everything about the class together. This is not optimal because: Some tests in the class make actual requests to Telegram, thu...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/3407
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[REFACTOR] Split test classes into two: `TestXXXNoRequest` & `TestXXXRequest`","articleBody":"Currently each of our test files has about one TestClass, which tests everything about the class together. This is not optimal because:\r\n\r\n1. Some tests in the class make actual requests to Telegram, thus slowing down development if you've made substantial changes to the class, but don't actually want to test the request part yet.\r\n2. It makes the tests slightly more readable, bearable and just a bit more organized.\r\n\r\n### Implementation\r\n\r\nFor example, `test_sticker.py` should now look like:\r\n\r\n``` python\r\nclass StickerSpace: # namespace class\r\n emoji = \"💪🏽 \"\r\n ...\r\n\r\n@pytest.mark.no_req # for faster development cycle\r\nclass TestStickerNoRequest:\r\n def test_de_json(...):\r\n ...\r\n def test_a_mock_request(...):\r\n ...\r\n\r\n@pytest.mark.req # don't think we need this, but let me know if you'd like this\r\n@pytest.mark.flaky(3, 1)\r\nclass TestStickerRequest:\r\n def test_custom_emoji(...):\r\n await bot.get_sticker_set(...)\r\n\r\n```\r\n\r\nAlong with this change, I'll also try to simplify/shorten some tests, if possible.\r\n","author":{"url":"https://github.com/harshil21","@type":"Person","name":"harshil21"},"datePublished":"2022-12-03T21:16:05Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/3407"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e214dfd1-b163-ae16-0c58-b9c20686f74e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A26:19E4BB:44CB6E3:5790E50:6B023C97 |
| html-safe-nonce | 00f7ed08eace7b698199d1df5728953e8d23c8aca4805502005ec86e8d2928a5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTI2OjE5RTRCQjo0NENCNkUzOjU3OTBFNTA6NkIwMjNDOTciLCJ2aXNpdG9yX2lkIjoiMzA2NTg2NjI5NzU2MTcyNjEwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4a04f2c0f14d29f92852e699f6052d9e214428eb13d6ffbc3ca9ad1946d6930e |
| hovercard-subject-tag | issue:1474238286 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/3407/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9e92118532c7ed2c7ef4512d47798e2abffcf5765454a4604b8864fc937d3c25/python-telegram-bot/python-telegram-bot/issues/3407 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9e92118532c7ed2c7ef4512d47798e2abffcf5765454a4604b8864fc937d3c25/python-telegram-bot/python-telegram-bot/issues/3407 |
| og:image:alt | Currently each of our test files has about one TestClass, which tests everything about the class together. This is not optimal because: Some tests in the class make actual requests to Telegram, thu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | harshil21 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width