slackapi / slackapi/python-slack-sdk
Update async unit tests to use unittest.IsolatedAsyncioTestCase base classes
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 4k
- Fork
- 857
- Merge medio
- 22h 21m
- PR unite (30g)
- 16
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Cerca nei test unitari delle suite WebClient e WebhookClient l’helper async_test, in particolare il suo utilizzo come decoratore e le classi base TestCase. Sostituisci questi utilizzi con unittest.IsolatedAsyncioTestCase, rimuovi l’utilizzo del metodo decoratore ed esegui le suite di test interessate per verificare che continuino a superare i test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing-qa
- Tipo di issue
- Refactoring
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100