Example #1
0
def test_changelog_markdown():
    data = [
        (
            ann.SectionTitle(1, "Enhancements", None),
            [
                ann.NewsEntry(2, "Enhancement 1", None),
                ann.NewsEntry(4, "Enhancement 2", None),
            ],
        ),
        (
            ann.SectionTitle(1, "Fixes", None),
            [ann.NewsEntry(1, "Fix 1", None),
             ann.NewsEntry(3, "Fix 2", None)],
        ),
    ]
    markdown = ann.changelog_markdown(data)
    assert "### Enhancements" in markdown
    assert "### Fixes" in markdown
    assert "1" in markdown
    assert "Fix 1" in markdown
    assert "2" in markdown
    assert "Enhancement 1" in markdown
    assert "https://github.com/Microsoft/vscode-python/issues/2" in markdown
    assert "3" in markdown
    assert "Fix 2" in markdown
    assert "https://github.com/Microsoft/vscode-python/issues/3" in markdown
    assert "4" in markdown
    assert "Enhancement 2" in markdown
Example #2
0
def test_changelog_markdown():
    data = [(ann.SectionTitle(1, 'Enhancements', None),
                [ann.NewsEntry(2, 'Enhancement 1', None),
                 ann.NewsEntry(4, 'Enhancement 2', None)]),
            (ann.SectionTitle(1, 'Fixes', None),
                [ann.NewsEntry(1, 'Fix 1', None),
                 ann.NewsEntry(3, 'Fix 2', None)])]
    markdown = ann.changelog_markdown(data)
    assert '### Enhancements' in markdown
    assert '### Fixes' in markdown
    assert '1' in markdown
    assert 'Fix 1' in markdown
    assert '2' in markdown
    assert 'Enhancement 1' in markdown
    assert 'https://github.com/Microsoft/vscode-python/issues/2' in markdown
    assert '3' in markdown
    assert 'Fix 2' in markdown
    assert 'https://github.com/Microsoft/vscode-python/issues/3' in markdown
    assert '4' in markdown
    assert 'Enhancement 2' in markdown