Skip to content

Commit 48e3559

Browse files
committed
Remove redundant textwrap.dedent()
1 parent a5dcbf2 commit 48e3559

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

Lib/test/test_platform.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import os
2-
import copy
31
import contextlib
2+
import copy
43
import io
54
import itertools
5+
import os
66
import pickle
77
import platform
88
import subprocess
99
import sys
1010
import unittest
11-
from textwrap import dedent
1211
from unittest import mock
1312

1413
from test import support
@@ -750,20 +749,11 @@ def setUp(self):
750749
platform.invalidate_caches()
751750
self.addCleanup(platform.invalidate_caches)
752751

753-
@staticmethod
754-
def text_normalize(string):
755-
"""Dedent *string* and strip it from its surrounding whitespaces.
756-
757-
This method is used by the other utility functions so that any
758-
string to write or to match against can be freely indented.
759-
"""
760-
return dedent(string).strip()
761-
762752
def invoke_platform(self, *flags):
763753
output = io.StringIO()
764754
with contextlib.redirect_stdout(output):
765755
platform._main(args=flags)
766-
return self.text_normalize(output.getvalue())
756+
return output.getvalue()
767757

768758
def test_unknown_flag(self):
769759
with self.assertRaises(SystemExit):

0 commit comments

Comments
 (0)