diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-04-30 19:43:50 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-04-30 19:45:18 -0400 |
commit | 991d2a3de5c59496398aaf4daed40583053392ea (patch) | |
tree | 9d8f427a70906315dfc274e50fe496aa08e3974f /tests/plugin2.py | |
parent | 78fa3d9db04889c1e4af445fa62b10502b063486 (diff) | |
download | python-coveragepy-git-nedbat/bug1150.tar.gz |
fix: don't warn that dynamic plugins already imported their source files. #1150nedbat/bug1150
Diffstat (limited to 'tests/plugin2.py')
-rw-r--r-- | tests/plugin2.py | 8 |
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.""" |