# HG changeset patch # User Gregory Szorc # Date 2019-01-23 01:50:52 # Node ID 6e54caaed08dcf005e68c1f497c2982aa497a503 # Parent 4ad002b2584d3cf3b6aeb2e3d3bc457db494c820 tests: normalize to bytes in test-install.t directory() was returning str and hgdirectory() was returning bytes. This made the set compare fail. Let's normalize the types on Python 3 so the test passes. Differential Revision: https://phab.mercurial-scm.org/D5650 diff --git a/tests/test-install.t b/tests/test-install.t --- a/tests/test-install.t +++ b/tests/test-install.t @@ -161,6 +161,7 @@ not found (this is intentionally using b > import subprocess > import sys > import xml.etree.ElementTree as ET + > from mercurial import pycompat > > # MSYS mangles the path if it expands $TESTDIR > testdir = os.environ['TESTDIR'] @@ -177,7 +178,7 @@ not found (this is intentionally using b > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns) > > for f in files: - > yield relpath + f.attrib['Name'] + > yield pycompat.sysbytes(relpath + f.attrib['Name']) > > def hgdirectory(relpath): > '''generator of tracked files, rooted at relpath''' @@ -204,11 +205,11 @@ not found (this is intentionally using b > > print('Not installed:') > for f in sorted(set(tracked) - set(installed)): - > print(' %s' % f) + > print(' %s' % pycompat.sysstr(f)) > > print('Not tracked:') > for f in sorted(set(installed) - set(tracked)): - > print(' %s' % f) + > print(' %s' % pycompat.sysstr(f)) > EOF $ ( testrepohgenv; "$PYTHON" wixxml.py help )