A plugin to show lint errors for IW
Project description
flake8_iw
Supported lint checks
Use of @patch
from unittest.mock import patch_alias
class ShiftGroupUpdatedTests(TestCase):
def test_created(self, mock_task):
self.mock_call = patch_alias("apps.openshifts.signals.task_update_shiftgroup_stats.delay")
...
from unittest.mock import patch
@patch("apps.openshifts.signals.task_update_shiftgroup_stats.delay")
def my_function(my_argument):
...
Lint check to prevent the use of @patch
and patch
directly.
Recommendation: Use PatchingTestCase
/ PatchingTransactionTestCase
instead
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flake8_iw-0.0.3.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file flake8_iw-0.0.3.tar.gz
.
File metadata
- Download URL: flake8_iw-0.0.3.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2747d7d54631cdd426762f1906a54281d9e8e9dd01992feaf4ecd61f569e42eb |
|
MD5 | 482490a93800fa279b8786f057b5f0ba |
|
BLAKE2b-256 | f6216f4c8c04c10ce024c91f59a0f60158841391d5c0cabb0bf6a798b90616db |
File details
Details for the file flake8_iw-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: flake8_iw-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a4b64a3f0a9d89e5b820616801aa2a4b25e3d47f5f1421022ca537108ec74f9 |
|
MD5 | 1c0d4b7168eb26d6793b8dd8964b6ecc |
|
BLAKE2b-256 | 8a8cb2fe818d12f5ba6a29a7bc2fe0576e3f73ec5ca4c9043285334fc60f14f0 |