From 08a9a364a18b39b36d445967d9d4b481fa6f682b Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 10 Sep 2021 17:18:12 -0600 Subject: [PATCH] v1.5.0 - small fixes --- .flake8 | 3 ++- .github/workflows/build.yml | 2 +- CHANGELOG.md | 6 ++++++ README_project.md | 2 +- setup.py | 7 +++---- test/unit/test_my_module.py | 10 ++++------ 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.flake8 b/.flake8 index 0e2e870..ad98539 100644 --- a/.flake8 +++ b/.flake8 @@ -1,2 +1,3 @@ [flake8] -max-line-length=100 +max-line-length = 100 +extend-ignore = E203 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1749ee..26fc71b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pythonversion: ["3.6", "3.7", "3.8", "3.9"] + pythonversion: ["3.7", "3.8", "3.9"] steps: - name: Checkout Repository uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a51b48..71e71b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## v1.5.0 (2021-09-10) + +* Drops support for Python 3.6 +* Removes the `mock` library in favor of the builtin `unittest.mock` library +* Fix some typos + ## v1.4.0 (2021-07-12) * Clarified various pieces of info diff --git a/README_project.md b/README_project.md index 659f352..8f859ae 100644 --- a/README_project.md +++ b/README_project.md @@ -19,7 +19,7 @@ A longer paragraph description of your project goes here. ```bash # Install tool -pip3 install project +pip3 install project_name # Install locally make install diff --git a/setup.py b/setup.py index 6b5eba7..03c7ca1 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,6 @@ DEV_REQUIREMENTS = [ 'coveralls == 3.*', 'flake8', - 'mock == 4.*', 'pytest == 6.*', 'pytest-cov == 2.*', ] @@ -33,12 +32,12 @@ ], install_requires=REQUIREMENTS, extras_require={ - 'dev': DEV_REQUIREMENTS + 'dev': DEV_REQUIREMENTS, }, entry_points={ 'console_scripts': [ - 'PROJECT_NAME_URL=project_name.my_module:main' + 'PROJECT_NAME_URL=project_name.my_module:main', ] }, - python_requires='>=3.6', + python_requires='>=3.7', ) diff --git a/test/unit/test_my_module.py b/test/unit/test_my_module.py index de12020..059333e 100644 --- a/test/unit/test_my_module.py +++ b/test/unit/test_my_module.py @@ -1,15 +1,13 @@ -import mock -from project_name.my_module import ( - main, - MyModule -) +from unittest.mock import patch + +from project_name.my_module import MyModule, main def test_my_function(): MyModule.my_function() -@mock.patch('project_name.my_module.MyModule.my_function') +@patch('project_name.my_module.MyModule.my_function') def test_main(mock_my_function): main() mock_my_function.assert_called_once()