From 22828f59b7e3ad709972dfdcb1a96029729234ef Mon Sep 17 00:00:00 2001 From: Aadi Bajpai Date: Thu, 15 Aug 2019 00:02:40 +0530 Subject: [PATCH] v1.0.1 Signed-off-by: Aadi Bajpai --- CHANGES.md | 8 ++++++++ README.md | 13 ++++++------- swaglyrics/__init__.py | 2 +- tests/test_main.py | 3 ++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c2a8860c..ccf1f7cf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 @@ -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). \ No newline at end of file diff --git a/README.md b/README.md index 709c208f..bf7382a7 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/swaglyrics/__init__.py b/swaglyrics/__init__.py index 9d87e103..83353f16 100644 --- a/swaglyrics/__init__.py +++ b/swaglyrics/__init__.py @@ -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' diff --git a/tests/test_main.py b/tests/test_main.py index c532ca6d..8c8a6a7c 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -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: