]> git.pld-linux.org Git - packages/python-sphinxtesters.git/blob - python-sphinxtesters-noconf.patch
- disable pytest plugins
[packages/python-sphinxtesters.git] / python-sphinxtesters-noconf.patch
1 --- sphinxtesters-0.2.3/sphinxtesters/tests/test_pagebuilder.py.orig    2019-08-07 00:44:39.000000000 +0200
2 +++ sphinxtesters-0.2.3/sphinxtesters/tests/test_pagebuilder.py 2022-03-28 16:50:58.786025816 +0200
3 @@ -3,10 +3,14 @@
4  
5  from os.path import (dirname, join as pjoin, isdir, isfile)
6  
7 +from sphinx.errors import ConfigError
8 +
9 +NO_CONFIG_ERRORS = (IOError, ConfigError)
10  try:  # Sphinx 1.8.0b1
11 -    from sphinx.errors import ApplicationError as NoConfigError
12 +    from sphinx.errors import ApplicationError
13 +    NO_CONFIG_ERRORS = (IOError, ConfigError, ApplicationError)
14  except ImportError:
15 -    from sphinx.errors import ConfigError as NoConfigError
16 +    pass
17  
18  from sphinxtesters.sphinxutils import PageBuilder
19  
20 @@ -81,10 +85,10 @@ def test_bad_pagebuilder():
21          def set_page_source(cls):
22              cls.page_source = HERE
23  
24 -    # ConfigError as of Sphinx 1.6.6
25 -    # ApplicationError as of 1.8.0b1
26 +    # ConfigError as of Sphinx 1.6.6 or 4.5.0
27 +    # ApplicationError as of 1.8.0b1-3.5.x
28      # See imports.
29 -    with pytest.raises((IOError, NoConfigError)):
30 +    with pytest.raises(NO_CONFIG_ERRORS):
31          TestBadPageBuilder.setup_class()
32  
33  
This page took 0.072925 seconds and 3 git commands to generate.