mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-02 09:00:00 -06:00
Add HTMLThemeFactory class
This commit is contained in:
1 parent
b405c0aaf5
commit
faefe2b5a5
6 files changed
+81
-77
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user