Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pep_sphinx_extensions/tests/pep_zero_generator/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,23 @@ def test_verify_email_addresses(test_input, expected):
assert out == expected


def test_verify_email_addresses_multiple_emails():
# Arrange
peps = [
parser.PEP(Path("pep_sphinx_extensions/tests/peps/pep-9000.rst")),
parser.PEP(Path("pep_sphinx_extensions/tests/peps/pep-9003.rst")),
]

# Act
out = writer._verify_email_addresses(peps)

# Assert: Francis has two emails combined, Javier's single email is not duplicated
assert out == {
"Francis Fussyreverend": "one@example.com, different@example.com",
"Javier Soulfulcommodore": "two@example.com",
}


def test_sort_authors():
# Arrange
authors_dict = {
Expand Down
7 changes: 7 additions & 0 deletions pep_sphinx_extensions/tests/peps/pep-9003.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PEP: 9003
Title: Test with author using a different email than in PEP 9000
Author: Francis Fussyreverend <different@example.com>,
Javier Soulfulcommodore <two@example.com>
Created: 20-Apr-2022
Status: Draft
Type: Process
Loading