Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
Signed-off-by: Aadi Bajpai <[email protected]>
  • Loading branch information
aadibajpai committed Aug 14, 2019
1 parent 9c538d2 commit 22828f5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

- #### v1.0.1
- Refactor cli.py to fix #1682
- Add type annotations to cli.py
- Bump code coverage to 90%
- Fully mock backend API calls in unit tests
- Add integration tests

- #### v1.0.0
- Refactor cli.py
- Unify backend
Expand Down Expand Up @@ -50,5 +57,6 @@
- Added Linux support
- Added more tests
- Set up code coverage and continuous integration

- #### v0.1.9
- A GitHub issue is created automatically on the repo when an unsupported song is encountered (implemented server-side using pythonanywhere).
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ The selected project can be found [here](https://summerofcode.withgoogle.com/pro

## Changelog

- #### v1.0.0
- Refactor cli.py
- Unify backend
- Refactor testsuite
- Fix bug in unsupported.txt handling
- drop support for pre Python 3.6 versions
- use f-strings
- #### v1.0.1
- Refactor cli.py to fix #1682
- Add type annotations to cli.py
- Bump code coverage to 90%
- Fully mock backend API calls in unit tests
- Add integration tests

See [CHANGES.md](CHANGES.md) for prior release notes.

Expand Down
2 changes: 1 addition & 1 deletion swaglyrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

name = 'swaglyrics'
__version__ = '1.0.0'
__version__ = '1.0.1'
unsupported_txt = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'unsupported.txt')
backend_url = 'https://aadibajpai.pythonanywhere.com'
3 changes: 2 additions & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ def test_that_unsupported_precheck_works_on_requests_errors(self, fake_get):
self.assertNotIn("New version of SwagLyrics available:", capturedOutput.getvalue())
self.assertIn("Could not update unsupported.txt successfully.", capturedOutput.getvalue())

@patch('swaglyrics.__main__.version', '1.0.0')
@patch('swaglyrics.__main__.requests.get')
def test_that_unsupported_precheck_works_on_permission_error(self, fake_get):
fake_get.side_effect = [requests.exceptions.RequestException, PermissionError]
fake_get.side_effect = [R(200, '0.2.6'), PermissionError]
capturedOutput = io.StringIO()
sys.stdout = capturedOutput
with self.assertRaises(SystemExit) as se:
Expand Down

0 comments on commit 22828f5

Please sign in to comment.