diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 13:46:29 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 16:24:37 -0400 |
commit | e96ef93d18831630687b6c026bed89a1f9149c90 (patch) | |
tree | 9f1e71e96cf9124fbc21b46c86840369d10fa9f7 /tests/test_plugins.py | |
parent | 9df434550a499c16e9fd26cfb9627837bfdc02a5 (diff) | |
download | python-coveragepy-git-e96ef93d18831630687b6c026bed89a1f9149c90.tar.gz |
refactor: remove unneeded backward.py shims
Removed were:
- StringIO
- configparser
- string_class
- unicode_class
- range
- zip_longest
- get_thread_id
- path_types
- shlex_quote
- reprlib
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 = [ |