File tree 1 file changed +15
-11
lines changed
1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,11 @@ from a test function at least once. To make this check, the second stack frame i
17
17
when a discovered function is invoked.
18
18
19
19
20
- # Command line arguments
21
- By default, all packages in the pytest session path are loaded and monitored, except for
22
- those named "test" or "tests". However, pytest_func_cov does provide a command line
23
- argument through which a specific module in the current folder can be specified:
24
-
25
- Example:
20
+ # Usage
26
21
``` bash
27
22
pytest --func_cov=myproject tests/
28
23
```
29
-
30
-
31
- # Output
32
- Example:
24
+ Produces a report like:
33
25
34
26
```
35
27
Found 10 functions and methods:
@@ -59,4 +51,16 @@ There are 5 functions and methods which were not called during testing:
59
51
- project.utilities.utils.SomeClass.greeting
60
52
61
53
Total function coverage: 50.0%
62
- ```
54
+ ```
55
+
56
+ # Configuration
57
+ A list of function name patters to ignore can be specified in pytest.ini.
58
+
59
+ Example:
60
+ ``` ini
61
+ [pytest]
62
+ ignore_func_names =
63
+ ^test_*
64
+ ^myfunction$
65
+ ```
66
+ This will ignore all function names starting with "test_ " and functions named "myfunction".
You can’t perform that action at this time.
0 commit comments