Exemple #1
0
def test_global_settings():
    parts = {
        'index':
        trim("""
            My Document

            $ AUTHOR = Arthur C. Clarke

            ` Part One
            """),
    }
    settings = Settings()
    settings.extract(parts)
    assert settings._ == {'AUTHOR': 'Arthur C. Clarke'}
Exemple #2
0
def test_multiline_authors():
    parts = {
        'index':
        trim("""
            My Document

            $ AUTHOR = Arthur C. Clarke
                     + Isaac Asimov

            ` Part One
            """),
    }
    settings = Settings()
    settings.extract(parts)
    assert settings._ == {'AUTHOR': 'Arthur C. Clarke + Isaac Asimov'}