@pragmatiks/lint 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
rules:
|
|
2
|
+
- id: pra-no-test-double-fixture
|
|
3
|
+
patterns:
|
|
4
|
+
- pattern-either:
|
|
5
|
+
- pattern: "def $FUNCTION(..., $NAME, ...): ..."
|
|
6
|
+
- pattern: "def $FUNCTION(..., $NAME: $TYPE, ...): ..."
|
|
7
|
+
- pattern: "async def $FUNCTION(..., $NAME, ...): ..."
|
|
8
|
+
- pattern: "async def $FUNCTION(..., $NAME: $TYPE, ...): ..."
|
|
9
|
+
- pattern: "pytest.mark.usefixtures(..., \"$NAME\", ...)"
|
|
10
|
+
- pattern: "$REQUEST.getfixturevalue(\"$NAME\")"
|
|
11
|
+
- metavariable-regex:
|
|
12
|
+
metavariable: $NAME
|
|
13
|
+
regex: '^(monkeypatch|(class_|module_|package_|session_)?mocker)$'
|
|
14
|
+
message: "testing policy: no mocks. The monkeypatch and mocker fixtures replace real code; test against real code and services."
|
|
15
|
+
severity: ERROR
|
|
16
|
+
languages: [python]
|