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_summary.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_summary.py')
-rw-r--r-- | tests/test_summary.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py index b6405bff..b00ee96b 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -5,6 +5,7 @@ """Test text-based summary reporting for coverage.py""" import glob +import io import os import os.path import py_compile @@ -13,7 +14,6 @@ import re import pytest import coverage -from coverage.backward import StringIO from coverage import env from coverage.control import Coverage from coverage.data import CoverageData @@ -655,7 +655,7 @@ class SummaryTest(UsingModulesMixin, CoverageTest): def get_report(self, cov): """Get the report from `cov`, and canonicalize it.""" - repout = StringIO() + repout = io.StringIO() cov.report(file=repout, show_missing=False) report = repout.getvalue().replace('\\', '/') report = re.sub(r" +", " ", report) @@ -779,7 +779,7 @@ class SummaryTest(UsingModulesMixin, CoverageTest): import usepkgs # pragma: nested # pylint: disable=import-error, unused-import cov.stop() # pragma: nested - repout = StringIO() + repout = io.StringIO() cov.report(file=repout, show_missing=False) report = repout.getvalue().replace('\\', '/') @@ -857,7 +857,7 @@ class SummaryReporterConfigurationTest(CoverageTest): for name, value in options: cov.set_option(name, value) printer = SummaryReporter(cov) - destination = StringIO() + destination = io.StringIO() printer.report([], destination) return destination.getvalue() |