summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_perf_profiler.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2022-09-01 09:47:40 (GMT)
committerGitHub <noreply@github.com>2022-09-01 09:47:40 (GMT)
commite93d1bda77b71db7ca150187f841fbb237772b2c (patch)
tree55cbbd24eb3f2b05e79588798d219bd21867ea62 /Lib/test/test_perf_profiler.py
parent0cd33e11fe6c77c423dbf3a7a9920daff012f006 (diff)
downloadcpython-e93d1bda77b71db7ca150187f841fbb237772b2c.zip
cpython-e93d1bda77b71db7ca150187f841fbb237772b2c.tar.gz
cpython-e93d1bda77b71db7ca150187f841fbb237772b2c.tar.bz2
gh-96143: subprocess API %s/universal_newlines=/text=/g. (GH-96468)
minor missed test cleanup to use the modern API from the big review. Automerge-Triggered-By: GH:gpshead
Diffstat (limited to 'Lib/test/test_perf_profiler.py')
-rw-r--r--Lib/test/test_perf_profiler.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_perf_profiler.py b/Lib/test/test_perf_profiler.py
index f587995..2b977d7 100644
--- a/Lib/test/test_perf_profiler.py
+++ b/Lib/test/test_perf_profiler.py
@@ -108,7 +108,7 @@ class TestPerfTrampoline(unittest.TestCase):
script = make_script(script_dir, "perftest", code)
with subprocess.Popen(
[sys.executable, "-Xperf", script],
- universal_newlines=True,
+ text=True,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
) as process:
@@ -157,7 +157,7 @@ class TestPerfTrampoline(unittest.TestCase):
script = make_script(script_dir, "perftest", code)
with subprocess.Popen(
[sys.executable, script],
- universal_newlines=True,
+ text=True,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
) as process:
@@ -211,7 +211,7 @@ def is_unwinding_reliable():
def perf_command_works():
try:
cmd = ["perf", "--help"]
- stdout = subprocess.check_output(cmd, universal_newlines=True)
+ stdout = subprocess.check_output(cmd, text=True)
except (subprocess.SubprocessError, OSError):
return False
@@ -237,7 +237,7 @@ def perf_command_works():
'print("hello")',
)
stdout = subprocess.check_output(
- cmd, cwd=script_dir, universal_newlines=True, stderr=subprocess.STDOUT
+ cmd, cwd=script_dir, text=True, stderr=subprocess.STDOUT
)
except (subprocess.SubprocessError, OSError):
return False