Patchwork D297: tests: update duplicateoptions test to use bytestrings everywhere

login
register
mail settings
Submitter phabricator
Date Aug. 9, 2017, 3:26 p.m.
Message ID <d1624fc6562a459754d14292679db54d@localhost.localdomain>
Download mbox | patch
Permalink /patch/22806/
State Not Applicable
Headers show

Comments

phabricator - Aug. 9, 2017, 3:26 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5b2f331d0a33: tests: update duplicateoptions test to use bytestrings everywhere (authored by durin42).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D297?vs=680&id=691

REVISION DETAIL
  https://phab.mercurial-scm.org/D297

AFFECTED FILES
  tests/test-duplicateoptions.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-duplicateoptions.py b/tests/test-duplicateoptions.py
--- a/tests/test-duplicateoptions.py
+++ b/tests/test-duplicateoptions.py
@@ -6,18 +6,18 @@ 
     ui as uimod,
 )
 
-ignore = {'highlight', 'win32text', 'factotum'}
+ignore = {b'highlight', b'win32text', b'factotum'}
 
 if os.name != 'nt':
-    ignore.add('win32mbcs')
+    ignore.add(b'win32mbcs')
 
 disabled = [ext for ext in extensions.disabled().keys() if ext not in ignore]
 
-hgrc = open(os.environ["HGRCPATH"], 'w')
-hgrc.write('[extensions]\n')
+hgrc = open(os.environ["HGRCPATH"], 'wb')
+hgrc.write(b'[extensions]\n')
 
 for ext in disabled:
-    hgrc.write(ext + '=\n')
+    hgrc.write(ext + b'=\n')
 
 hgrc.close()
 
@@ -30,7 +30,7 @@ 
     option[0] and globalshort.add(option[0])
     option[1] and globallong.add(option[1])
 
-for cmd, entry in commands.table.iteritems():
+for cmd, entry in commands.table.items():
     seenshort = globalshort.copy()
     seenlong = globallong.copy()
     for option in entry[1]: