This repository has been archived by the owner on May 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from rpitonak/fix-170
repository name != pypi name follow-up
- Loading branch information
Showing
10 changed files
with
104 additions
and
25 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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
changelog: | ||
- Example changelog entry | ||
- Another changelog entry | ||
author_name: John Smith | ||
author_email: [email protected] | ||
labels: | ||
- bot | ||
- release-bot | ||
- user-cont | ||
pypi_project: release-botos |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[metadata] | ||
name = release-botos |
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
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
from pathlib import Path | ||
import pytest | ||
|
||
from release_bot.configuration import configuration | ||
from release_bot.configuration import configuration, Configuration | ||
|
||
|
||
class TestLoadReleaseConf: | ||
|
@@ -87,6 +87,14 @@ def valid_conf(self): | |
""" | ||
return (Path(__file__).parent / "src/release-conf.yaml").read_text() | ||
|
||
@pytest.fixture | ||
def different_pypi_name_conf(self): | ||
""" | ||
Emulates configuration with different pypi project name | ||
:return: | ||
""" | ||
return (Path(__file__).parent / "src/different-pypi-name.yaml").read_text() | ||
|
||
def test_empty_conf(self, empty_conf): | ||
# if there are any required items, this test must fail | ||
if configuration.REQUIRED_ITEMS['release-conf']: | ||
|
@@ -132,3 +140,8 @@ def test_normal_use_case(self, valid_conf, valid_new_release): | |
assert valid_new_release['author_name'] == 'John Smith' | ||
assert valid_new_release['author_email'] == '[email protected]' | ||
assert valid_new_release['labels'] == ['bot', 'release-bot', 'user-cont'] | ||
|
||
def test_different_pypi_name(self, different_pypi_name_conf): | ||
c = Configuration() | ||
c.load_release_conf(different_pypi_name_conf) | ||
assert c.pypi_project == "release-botos" |
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