diff options
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r-- | tests/test_plugins.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 59be645c..5a8d92ee 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -4,6 +4,7 @@ """Tests for plugins.""" import inspect +import io import os.path from xml.etree import ElementTree @@ -11,7 +12,7 @@ import pytest import coverage from coverage import env -from coverage.backward import StringIO, import_local_file +from coverage.backward import import_local_file from coverage.data import line_counts from coverage.control import Plugins from coverage.misc import CoverageException @@ -188,7 +189,7 @@ class PluginTest(CoverageTest): def coverage_init(reg, options): reg.add_file_tracer(Plugin()) """) - debug_out = StringIO() + debug_out = io.StringIO() cov = coverage.Coverage(debug=["sys"]) cov._debug_file = debug_out cov.set_option("run:plugins", ["plugin_sys_info"]) @@ -218,7 +219,7 @@ class PluginTest(CoverageTest): def coverage_init(reg, options): reg.add_configurer(Plugin()) """) - debug_out = StringIO() + debug_out = io.StringIO() cov = coverage.Coverage(debug=["sys"]) cov._debug_file = debug_out cov.set_option("run:plugins", ["plugin_no_sys_info"]) @@ -411,7 +412,7 @@ class GoodFileTracerTest(FileTracerTest): self.start_import_stop(cov, "caller") - repout = StringIO() + repout = io.StringIO() total = cov.report(file=repout, include=["*.html"], omit=["uni*.html"], show_missing=True) report = repout.getvalue().splitlines() expected = [ @@ -511,7 +512,7 @@ class GoodFileTracerTest(FileTracerTest): cov.set_option("run:plugins", ["fairly_odd_plugin"]) self.start_import_stop(cov, "unsuspecting") - repout = StringIO() + repout = io.StringIO() total = cov.report(file=repout, show_missing=True) report = repout.getvalue().splitlines() expected = [ |