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.4.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file flake8_iw-0.0.4.tar.gz
.
File metadata
- Download URL: flake8_iw-0.0.4.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 | ac2670ee9f32f0d307055c1132abe084ff801c8d35fb212a897d501e963c1db4 |
|
MD5 | e01ccb26ad89ac8351538c3b8decac2d |
|
BLAKE2b-256 | d41381440f357b32fd7ce14c8c1edb001120994076284911a79a3045e2fe8236 |
File details
Details for the file flake8_iw-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: flake8_iw-0.0.4-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 | 55d991c08178740575e329602ffb9694c5a4a2389d4932a3c3c474c6f59fb065 |
|
MD5 | c64ca28ccb56ceee573f0ccdbd934667 |
|
BLAKE2b-256 | ca1e0564a95787356cfa04c26fe3ed0d701d12f90016163dcde8e287f60db007 |