Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: disable doctest in format_languages() (#10357)
The doc tests are cursed: ``` 450 Format language data to match Open Library's expected format.451 >>> format_languages(["eng", "fre"])UNEXPECTED EXCEPTION: AttributeError("'ThreadedDict' object has no attribute 'site'")Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/doctest.py", line 1361, in __run exec(compile(example.source, filename, "single", File "<doctest openlibrary.catalog.utils.format_languages[0]>", line 1, in <module> File "/home/runner/work/openlibrary/openlibrary/openlibrary/catalog/utils/__init__.py", line 459, in format_languages if web.ctx.site.get(f"/languages/{language.lower()}") is None: ^^^^^^^^^^^^AttributeError: 'ThreadedDict' object has no attribute 'site' ```
- Loading branch information