Add HTMLThemeFactory class

This commit is contained in:
Takeshi KOMIYA committed 2017-04-20 20:45:44 +09:00
1 parent b405c0aaf5
commit faefe2b5a5
6 files changed
+81 -77

No files matched your search

+4 -8
View File
@@ -10,14 +10,10 @@
"""
import os
import zipfile
import mock
import pytest
from sphinx.theming import Theme, ThemeError
from util import path
from sphinx.theming import ThemeError
@pytest.mark.sphinx(
@@ -27,12 +23,12 @@ def test_theme_api(app, status, warning):
cfg = app.config
# test Theme class API
assert set(Theme.themes.keys()) == \
assert set(app.html_themes.keys()) == \
set(['basic', 'default', 'scrolls', 'agogo', 'sphinxdoc', 'haiku',
'traditional', 'testtheme', 'ziptheme', 'epub', 'nature',
'pyramid', 'bizstyle', 'classic', 'nonav'])
assert Theme.themes['testtheme'] == app.srcdir / 'testtheme'
assert Theme.themes['ziptheme'] == app.srcdir / 'ziptheme.zip'
assert app.html_themes['testtheme'] == app.srcdir / 'testtheme'
assert app.html_themes['ziptheme'] == app.srcdir / 'ziptheme.zip'
# test Theme instance API
theme = app.builder.theme