Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ Adapt rules to suit your needs!
Imagine that we have this code:

```python
try: # pragma: has-django
try: # pragma: has-no-django
import django
except ImportError: # pragma: has-no-django
except ImportError: # pragma: has-django
django = None

def run_if_django_is_installed():
if django is not None: # pragma: has-django
if django is not None: # pragma: has-no-django
...
```

Expand All @@ -96,6 +96,9 @@ rules =

```

Important to consider here is that the condition evaluating to `True`
means that the coverage will be ignored.

When running tests with and without `django` installed
you will have `100%` coverage in both cases.

Expand Down