##// END OF EJS Templates
tests: fix various test-check-module-imports.t violations...
Augie Fackler -
r36663:7bc33d67 default
parent child Browse files
Show More
@@ -54,8 +54,8 b' tool itself by doctest'
54 Check i18n cache isn't reused after encoding change:
54 Check i18n cache isn't reused after encoding change:
55
55
56 $ cat > $TESTTMP/encodingchange.py << EOF
56 $ cat > $TESTTMP/encodingchange.py << EOF
57 > from mercurial.i18n import _
57 > from mercurial import encoding, registrar
58 > from mercurial import encoding, registrar
58 > from mercurial.i18n import _
59 > cmdtable = {}
59 > cmdtable = {}
60 > command = registrar.command(cmdtable)
60 > command = registrar.command(cmdtable)
61 > @command(b'encodingchange', norepo=True)
61 > @command(b'encodingchange', norepo=True)
@@ -616,8 +616,8 b' enabled adds the lfs requirement'
616 $ cat > $TESTTMP/dumpflog.py << EOF
616 $ cat > $TESTTMP/dumpflog.py << EOF
617 > # print raw revision sizes, flags, and hashes for certain files
617 > # print raw revision sizes, flags, and hashes for certain files
618 > import hashlib
618 > import hashlib
619 > from mercurial.node import short
619 > from mercurial import revlog
620 > from mercurial import revlog
620 > from mercurial.node import short
621 > def hash(rawtext):
621 > def hash(rawtext):
622 > h = hashlib.sha512()
622 > h = hashlib.sha512()
623 > h.update(rawtext)
623 > h.update(rawtext)
@@ -85,7 +85,12 b" don't allow marking or unmarking driver-"
85
85
86 $ cat > $TESTTMP/markdriver.py << EOF
86 $ cat > $TESTTMP/markdriver.py << EOF
87 > '''mark and unmark files as driver-resolved'''
87 > '''mark and unmark files as driver-resolved'''
88 > from mercurial import merge, registrar, scmutil, pycompat
88 > from mercurial import (
89 > merge,
90 > pycompat,
91 > registrar,
92 > scmutil,
93 > )
89 > cmdtable = {}
94 > cmdtable = {}
90 > command = registrar.command(cmdtable)
95 > command = registrar.command(cmdtable)
91 > @command(b'markdriver',
96 > @command(b'markdriver',
@@ -220,8 +220,8 b' I/O errors on stdio are handled properly'
220 > import errno
220 > import errno
221 > from mercurial.i18n import _
221 > from mercurial.i18n import _
222 > from mercurial import (
222 > from mercurial import (
223 > error,
223 > registrar,
224 > registrar,
224 > error,
225 > ui as uimod,
225 > ui as uimod,
226 > )
226 > )
227 >
227 >
@@ -2,7 +2,8 b''
2
2
3 $ cat > $TESTTMP/editor.py <<EOF
3 $ cat > $TESTTMP/editor.py <<EOF
4 > #!$PYTHON
4 > #!$PYTHON
5 > import os, sys
5 > import os
6 > import sys
6 > path = os.path.join(os.environ['TESTTMP'], 'messages')
7 > path = os.path.join(os.environ['TESTTMP'], 'messages')
7 > messages = open(path).read().split('--\n')
8 > messages = open(path).read().split('--\n')
8 > prompt = open(sys.argv[1]).read()
9 > prompt = open(sys.argv[1]).read()
General Comments 0
You need to be logged in to leave comments. Login now