How to use the alabaster.version.__version_info__ function in alabaster

To help you get started, we’ve selected a few alabaster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sphinx-doc / sphinx / tests / test_theming.py View on Github external
def test_theme_api(app, status, warning):
    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
    assert set(app.html_themes.keys()) == set(themes)
    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['staticfiles'] == app.srcdir / 'test_theme' / 'staticfiles'

    # test Theme instance API
    theme = app.builder.theme
    assert theme.name == 'ziptheme'
    themedir = theme.themedir
    assert theme.base.name == 'basic'
    assert len(theme.get_theme_dirs()) == 2

    # direct setting

alabaster

A light, configurable Sphinx theme

BSD-2-Clause
Latest version published 5 months ago

Package Health Score

86 / 100
Full package analysis