slackapi / slackapi/python-slack-sdk

Update async unit tests to use unittest.IsolatedAsyncioTestCase base classes

オープン
#1,052 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

tests
主要言語
Python
スター
4k
フォーク
857
平均マージ
22時間 21分
マージ済み PR(30日)
16

説明

Currently unit tests employ a helper async_test method defined in in order to run async tests.

As of v3.8, the unittest module supports a base class IsolatedAsyncioTestCase with a similar API to TestCase, but which also accepts coroutines as test functions. We can update unit test implementations to use this instead of TestCase around the time we decide to support the later version of Python as well.

Todo: For test suites where async_test (typically this is used in the decorator pattern i.e. @async_test) is used, replace TestCase with IsolatedAsyncioTestCase and remove decorator method usage.

Category (place an x in each of the [ ])
  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)
Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

WebClient と WebhookClient のテストスイートのユニットテストで async_test ヘルパーを検索し、特にデコレーターとしての使用と TestCase 基底クラスを確認します。これらの使用を unittest.IsolatedAsyncioTestCase に置き換え、デコレーターメソッドの使用を削除し、影響を受けるテストスイートを実行して引き続きパスすることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
testing-qa
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。