# HG changeset patch # User Gregory Szorc # Date 2022-02-20 20:20:33 # Node ID f928dec9add7c20abddda67775db2c704c3a8f81 # Parent 9d01ab54df3f6964510c7dd6f3ca1a4244fc766f tests: unconditionalize _unified_diff Now that we're Python 3 only we can make this logic simpler. Differential Revision: https://phab.mercurial-scm.org/D12237 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -52,6 +52,7 @@ import contextlib import difflib import distutils.version as version import errno +import functools import json import multiprocessing import os @@ -879,11 +880,7 @@ def makecleanable(path): pass -_unified_diff = difflib.unified_diff -if PYTHON3: - import functools - - _unified_diff = functools.partial(difflib.diff_bytes, difflib.unified_diff) +_unified_diff = functools.partial(difflib.diff_bytes, difflib.unified_diff) def getdiff(expected, output, ref, err):