Repository: jupyter/papyri (language: python)

Issue:
Running tests without rendering fails
At the moment if we run tests without rendering, it fails:

```python
self = PosixPath('/Users/aktech/.papyri/html/p/numpy/1.23.4/api/numpy.html'), name = '/Users/aktech/.papyri/html/p/numpy/1.23.4/api/numpy.html', flags = 16777216, mode = 438

    def _opener(self, name, flags, mode=0o666):
        # A stub for the opener argument to built-in open()
>       return self._accessor.open(self, flags, mode)
E       FileNotFoundError: [Errno 2] No such file or directory: '/Users/aktech/.papyri/html/p/numpy/1.23.4/api/numpy.html'

../../miniconda3/envs/papyri/lib/python3.9/pathlib.py:1120: FileNotFoundError
```


Discussion / hints:
Thanks !

Right now this is because the test suite assume you have ran 'papyri render' to render al the possible pages ahead of time. We should likely render the page on the fly in the test.
You likely can pull `HtmlRenderer` from `papyri/render.py` and call the `_route` method with `RefInfo(module="numpy", version="1.22.4", kind="api", path=None)` or something like this.

Fix patch:
diff --git a/.gitignore b/.gitignore
index 3cb6ec77..68da1c77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+__pycache__
 .pytest_cache/
 papyri/rst.so
 cache


Test patch:
diff --git a/papyri/tests/test_full_render.py b/papyri/tests/test_full_render.py
index 8ed80576..0fe1a457 100644
--- a/papyri/tests/test_full_render.py
+++ b/papyri/tests/test_full_render.py
@@ -1,6 +1,9 @@
+import logging
+
 from papyri.config import html_dir
 import pytest
 
+log = logging.getLogger("papyri")
 
 PRESENT_PATTERNS = [
     (
@@ -13,5 +16,12 @@
 
 @pytest.mark.parametrize("path, reason, expected", PRESENT_PATTERNS)
 def test_render(path, reason, expected):
-    text = (html_dir / path).read_text()
+    html_path = html_dir / path
+    if not html_path.exists():
+        logging.info("papyri render not done, rendering now.")
+        from papyri.render import main as m2
+        import trio
+
+        trio.run(m2, False, True, False, True, True, False)
+    text = html_path.read_text()
     assert expected in text, reason