jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
170 stars 31 forks source link

Extract fixtures to a pytest plugin #326

Closed krassowski closed 4 months ago

krassowski commented 4 months ago

Problem

For testing the collaboration mode and requires quite a specific setup to get a document room open. Since a number of extensions exists building on the shared model capabilities, it would be perfect if those could write pytest tests without duplicating the logic which is subject to change.

A few examples where python tests would be useful but are presently missing:

Proposed Solution

Move some fixtures from tests/conftest.py to projects/jupyter-server-ydoc/jupyter_server_ydoc/pytest_plugin.py.

Additional context

Other jupyter-server extensions (including jupyterlab, jupyterlab_server, jupyter_server_fileid and jupyter_server itself) ship with a set of fixtures in pytest_plugin module, e.g.: