Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update async unit tests to use unittest.IsolatedAsyncioTestCase base classes #1052

Open
2 of 9 tasks
srajiang opened this issue Jun 28, 2021 · 1 comment
Open
2 of 9 tasks
Labels
tests M-T: Testing work only
Milestone

Comments

@srajiang
Copy link
Member

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.

@srajiang srajiang added untriaged enhancement M-T: A feature request for new functionality good first issue and removed untriaged labels Jun 28, 2021
@seratch
Copy link
Member

seratch commented Jun 28, 2021

@srajiang Thanks for creating the issue! I agree that we can use the base class in the future 👍 However, as we haven't decided when to drop supporting 3.6 / 3.7 (I'm sure that we will continue supporting them at least for one year, probably for years), let's remove the "good first issue" label from this issue at the moment.

@seratch seratch added tests M-T: Testing work only Version: 3x and removed enhancement M-T: A feature request for new functionality good first issue Version: 3x labels Jun 28, 2021
@seratch seratch added this to the 4.x milestone Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests M-T: Testing work only
Projects
None yet
Development

No branches or pull requests

2 participants