-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve pyproject.toml, add py.typed
- Loading branch information
1 parent
8c75306
commit e031b25
Showing
12 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.0.1" | ||
__version__ = "1.0.2" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,6 +197,40 @@ def test_contributor_alt_names(): | |
] | ||
|
||
|
||
def test_contributor_name_set(): | ||
""" | ||
When a name is specified for a contributor by email, it is used. | ||
""" | ||
plugin = ContribsPlugin() | ||
|
||
contributors = [ | ||
Contributor("Charlie Marrone", "[email protected]", count=2), | ||
] | ||
|
||
reader_mock = Mock(ContributionsReader) | ||
reader_mock.get_contributors.return_value = contributors | ||
|
||
file_mock = Mock(File) | ||
file_mock.src_path = Path("foo.txt") | ||
plugin._contribs_reader = reader_mock | ||
result = plugin._get_contributors(file_mock) | ||
|
||
assert result == contributors | ||
|
||
# setting | ||
plugin.config = { | ||
"contributors": [ | ||
{"email": "[email protected]", "name": "Charlie Brown"} | ||
] | ||
} | ||
|
||
result = plugin._get_contributors(file_mock) | ||
|
||
assert result == [ | ||
Contributor("Charlie Brown", "[email protected]", count=2), | ||
] | ||
|
||
|
||
def test_contributors_exclude(): | ||
handler = ContribsPlugin() | ||
handler.config = _get_contribs_config() | ||
|