comparison tests/test-profile.t @ 48876:42d2b31cee0b

tests: remove from __future__ from inline Python in tests This is no longer required since we require Python 3 and the linter no longer requires these statements. Differential Revision: https://phab.mercurial-scm.org/D12255
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Feb 2022 15:28:44 -0700
parents dc3f7aa15423
children 7e5be4a7cda7
comparison
equal deleted inserted replaced
48875:6000f5b25c9b 48876:42d2b31cee0b
130 130
131 #if no-chg 131 #if no-chg
132 profiler extension could be loaded before other extensions 132 profiler extension could be loaded before other extensions
133 133
134 $ cat > fooprof.py <<EOF 134 $ cat > fooprof.py <<EOF
135 > from __future__ import absolute_import
136 > import contextlib 135 > import contextlib
137 > import sys 136 > import sys
138 > @contextlib.contextmanager 137 > @contextlib.contextmanager
139 > def profile(ui, fp): 138 > def profile(ui, fp):
140 > print('fooprof: start profile') 139 > print('fooprof: start profile')
145 > def extsetup(ui): 144 > def extsetup(ui):
146 > ui.write(b'fooprof: loaded\n') 145 > ui.write(b'fooprof: loaded\n')
147 > EOF 146 > EOF
148 147
149 $ cat > otherextension.py <<EOF 148 $ cat > otherextension.py <<EOF
150 > from __future__ import absolute_import
151 > def extsetup(ui): 149 > def extsetup(ui):
152 > ui.write(b'otherextension: loaded\n') 150 > ui.write(b'otherextension: loaded\n')
153 > EOF 151 > EOF
154 152
155 $ hg init b 153 $ hg init b