Skip to content

Commit

Permalink
Sphinx integration test disabled.
Browse files Browse the repository at this point in the history
This commit temporarily disables the Sphinx-specific
`test_sphinx_docs_these()` integration test due to an unpredictable
upstream API that appears to be chaotically breaking behind our backs,
resolving a recent spate of spurious failures in our GitHub
Actions-based continuous integration (CI) workflow. The culprit is
almost certainly the `sphinx.testing.fixtures` API, which has yet to be
properly documented. That said, we've personally validated that this API
does still define the expected "make_app" fixture. So, it's unclear
exactly why CI is complaining about that fixture being undefined:

    ___________________ ERROR at setup of test_sphinx_docs_these ___________________
    file /home/runner/work/beartype/beartype/beartype_test/a90_func/z90_lib/a00_sphinx/test_sphinx.py, line 105
      @skip_unless_package('sphinx')
      def test_sphinx_docs_these(make_app, tmp_path) -> None:
    E       fixture 'make_app' not found
    >       available fixtures: cache, capfd, capfdbinary, caplog,
            capsys, capsysbinary, doctest_namespace, monkeypatch,
            pytestconfig, record_property, record_testsuite_property,
            record_xml_attribute, recwarn, tmp_path, tmp_path_factory,
            tmpdir, tmpdir_factory
    >       use 'pytest --fixtures [testpath]' for help on them.

    /home/runner/work/beartype/beartype/beartype_test/a90_func/z90_lib/a00_sphinx/test_sphinx.py:105

See also upstream issue sphinx-doc/sphinx#7008. (*Constantly on in an instant!*)
  • Loading branch information
leycec committed Apr 18, 2024
1 parent 8727751 commit 9536a8f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion beartype/_util/hint/pep/proposal/pep484/utilpep484union.py
Expand Up @@ -50,7 +50,7 @@ def make_hint_pep484_union(hints: tuple) -> object:
Raises
------
:exc:`TypeError`
TypeError
If this tuple is empty.
'''
assert isinstance(hints, tuple), f'{repr(hints)} not tuple.'
Expand Down
21 changes: 20 additions & 1 deletion beartype_test/a90_func/z90_lib/a00_sphinx/test_sphinx.py
Expand Up @@ -15,7 +15,10 @@
# WARNING: To raise human-readable test errors, avoid importing from
# package-specific submodules at module scope.
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
from beartype_test._util.mark.pytskip import skip_unless_package
from beartype_test._util.mark.pytskip import (
skip,
skip_unless_package,
)

# ....................{ TESTS }....................
@skip_unless_package('sphinx')
Expand Down Expand Up @@ -97,11 +100,27 @@ def test_sphinx_docs_other(tmp_path) -> None:
run_command_forward_output(command_words=SPHINX_ARGS)


#FIXME: For unknown reasons, this currently fails despite working for literally
#years. The culprit is almost certainly the "sphinx.testing.fixtures" API, which
#has yet to be properly documented. That said, we've personally validated that
#this API does still define the expected "make_app" fixture. So, it's unclear
#exactly why our GitHub Actions-based continuous integration (CI) workflow is
#complaining about that fixture being undefined:
# ___________________ ERROR at setup of test_sphinx_docs_these ___________________
# file /home/runner/work/beartype/beartype/beartype_test/a90_func/z90_lib/a00_sphinx/test_sphinx.py, line 105
# @skip_unless_package('sphinx')
# def test_sphinx_docs_these(make_app, tmp_path) -> None:
# E fixture 'make_app' not found
# > available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
# > use 'pytest --fixtures [testpath]' for help on them.
#
# /home/runner/work/beartype/beartype/beartype_test/a90_func/z90_lib/a00_sphinx/test_sphinx.py:105
#FIXME: For the benefit of the community, externally document how to do this
#for others at this open issue:
# https://github.com/sphinx-doc/sphinx/issues/7008
#Note the trivial "conftest" submodule in this directory. Since this is all
#surprisingly easy, a simple comment describing this should easily suffice.
@skip('Currently broken due to Sphinx breaking backward compatibility.')
@skip_unless_package('sphinx')
def test_sphinx_docs_these(make_app, tmp_path) -> None:
'''
Expand Down

0 comments on commit 9536a8f

Please sign in to comment.