mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix broken testcase by alabaster-0.711
This commit is contained in:
parent
1dffeba0bc
commit
e1a87ba073
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import alabaster
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.theming import ThemeError
|
from sphinx.theming import ThemeError
|
||||||
@ -23,11 +24,14 @@ from sphinx.theming import ThemeError
|
|||||||
def test_theme_api(app, status, warning):
|
def test_theme_api(app, status, warning):
|
||||||
cfg = app.config
|
cfg = app.config
|
||||||
|
|
||||||
|
themes = ['basic', 'default', 'scrolls', 'agogo', 'sphinxdoc', 'haiku',
|
||||||
|
'traditional', 'epub', 'nature', 'pyramid', 'bizstyle', 'classic', 'nonav',
|
||||||
|
'test-theme', 'ziptheme', 'staticfiles', 'parent', 'child']
|
||||||
|
if alabaster.version.__version_info__ >= (0, 7, 11):
|
||||||
|
themes.append('alabaster')
|
||||||
|
|
||||||
# test Theme class API
|
# test Theme class API
|
||||||
assert set(app.html_themes.keys()) == \
|
assert set(app.html_themes.keys()) == set(themes)
|
||||||
set(['basic', 'default', 'scrolls', 'agogo', 'sphinxdoc', 'haiku',
|
|
||||||
'traditional', 'epub', 'nature', 'pyramid', 'bizstyle', 'classic', 'nonav',
|
|
||||||
'test-theme', 'ziptheme', 'staticfiles', 'parent', 'child'])
|
|
||||||
assert app.html_themes['test-theme'] == app.srcdir / 'test_theme' / 'test-theme'
|
assert app.html_themes['test-theme'] == app.srcdir / 'test_theme' / 'test-theme'
|
||||||
assert app.html_themes['ziptheme'] == app.srcdir / 'ziptheme.zip'
|
assert app.html_themes['ziptheme'] == app.srcdir / 'ziptheme.zip'
|
||||||
assert app.html_themes['staticfiles'] == app.srcdir / 'test_theme' / 'staticfiles'
|
assert app.html_themes['staticfiles'] == app.srcdir / 'test_theme' / 'staticfiles'
|
||||||
|
Loading…
Reference in New Issue
Block a user