summaryrefslogtreecommitdiff
path: root/tests/plugin2.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-04-30 19:43:50 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-05-01 07:02:44 -0400
commit27d8255458cc28dcf1b6358a5a735d1653cba35e (patch)
tree9ece66ee025251cb8ca6e8c900234ed432080c22 /tests/plugin2.py
parentb1b2b8b25131dec6f563b122c63b418afe741690 (diff)
downloadpython-coveragepy-git-27d8255458cc28dcf1b6358a5a735d1653cba35e.tar.gz
fix: don't warn that dynamic plugins already imported their source files. #1150
Diffstat (limited to 'tests/plugin2.py')
-rw-r--r--tests/plugin2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/plugin2.py b/tests/plugin2.py
index c334628a..60d16206 100644
--- a/tests/plugin2.py
+++ b/tests/plugin2.py
@@ -7,6 +7,14 @@ import os.path
import coverage
+try:
+ import third.render # pylint: disable=unused-import
+except ImportError:
+ # This plugin is used in a few tests. One of them has the third.render
+ # module, but most don't. We need to import it but not use it, so just
+ # try importing it and it's OK if the module doesn't exist.
+ pass
+
class Plugin(coverage.CoveragePlugin):
"""A file tracer plugin for testing."""