comparison tests/test-worker.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 af0b21d5a930
children 950c39918bd2
comparison
equal deleted inserted replaced
48875:6000f5b25c9b 48876:42d2b31cee0b
1 Test UI worker interaction 1 Test UI worker interaction
2 2
3 $ cat > t.py <<EOF 3 $ cat > t.py <<EOF
4 > from __future__ import absolute_import, print_function
5 > import sys 4 > import sys
6 > import time 5 > import time
7 > from mercurial import ( 6 > from mercurial import (
8 > error, 7 > error,
9 > registrar, 8 > registrar,
98 Exception: unknown exception 97 Exception: unknown exception
99 98
100 Workers should not do cleanups in all cases 99 Workers should not do cleanups in all cases
101 100
102 $ cat > $TESTTMP/detectcleanup.py <<EOF 101 $ cat > $TESTTMP/detectcleanup.py <<EOF
103 > from __future__ import absolute_import
104 > import atexit 102 > import atexit
105 > import os 103 > import os
106 > import sys 104 > import sys
107 > import time 105 > import time
108 > sys.unraisablehook = lambda x: None 106 > sys.unraisablehook = lambda x: None
132 [255] 130 [255]
133 131
134 Do not crash on partially read result 132 Do not crash on partially read result
135 133
136 $ cat > $TESTTMP/detecttruncated.py <<EOF 134 $ cat > $TESTTMP/detecttruncated.py <<EOF
137 > from __future__ import absolute_import
138 > import os 135 > import os
139 > import sys 136 > import sys
140 > import time 137 > import time
141 > sys.unraisablehook = lambda x: None 138 > sys.unraisablehook = lambda x: None
142 > oldwrite = os.write 139 > oldwrite = os.write