diff --git a/python/pycrdt/__init__.py b/python/pycrdt/__init__.py index 6c0d29a..732c496 100644 --- a/python/pycrdt/__init__.py +++ b/python/pycrdt/__init__.py @@ -41,3 +41,7 @@ from ._xml import XmlEvent as XmlEvent from ._xml import XmlFragment as XmlFragment from ._xml import XmlText as XmlText + + +def import_pycrdt(): + import pycrdt diff --git a/tests/test_subinterpreters.py b/tests/test_subinterpreters.py new file mode 100644 index 0000000..248a1ed --- /dev/null +++ b/tests/test_subinterpreters.py @@ -0,0 +1,11 @@ +import pytest + +from anyio import to_interpreter + +from pycrdt import import_pycrdt + +pytestmark = pytest.mark.anyio + + +async def test_subinterpreter(): + await to_interpreter.run_sync(import_pycrdt)