slackapi / slackapi/python-slack-sdk

Update async unit tests to use unittest.IsolatedAsyncioTestCase base classes

Abierto
#1,052 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

tests
Lenguaje dominante
Python
Estrellas
4k
Forks
857
Merge medio
22 h 21 min
PR fusionados (30 d)
16

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Busca en las pruebas unitarias de las suites WebClient y WebhookClient el helper async_test, especialmente su uso como decorador y las clases base TestCase. Sustituye esos usos por unittest.IsolatedAsyncioTestCase, elimina el uso del método decorador y ejecuta las suites de pruebas afectadas para confirmar que siguen pasando.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
testing-qa
Tipo de issue
Refactorización
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.