Patchwork [2,of,7] tests: define class in modern style to avoid check-code.py error

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Feb. 17, 2019, 5:19 p.m.
Message ID <308243c661d7fb232997.1550423965@footprints>
Download mbox | patch
Permalink /patch/38801/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Feb. 17, 2019, 5:19 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1550417245 -32400
#      Mon Feb 18 00:27:25 2019 +0900
# Node ID 308243c661d7fb232997d290dfd861b95e36f090
# Parent  b618569414e7d2db2c1d31a17c15bda3b8830901
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r 308243c661d7
# EXP-Topic tests-fix-check-code-errors
tests: define class in modern style to avoid check-code.py error

This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.

Patch

diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -855,7 +855,7 @@  preoutgoing hook can prevent outgoing ch
   > def printtags(ui, repo, **args):
   >     ui.write(b'[%s]\n' % b', '.join(sorted(repo.tags())))
   > 
-  > class container:
+  > class container(object):
   >     unreachable = 1
   > EOF