##// END OF EJS Templates
py3: suppress the output from .write() calls in few tests...
Pulkit Goyal -
r38091:0a10f142 default
parent child Browse files
Show More
@@ -180,7 +180,7 b' Test files status in different revisions'
180
180
181 Test files properties
181 Test files properties
182
182
183 >>> open('bin', 'wb').write(b'\0a')
183 >>> open('bin', 'wb').write(b'\0a') and None
184 $ fileset 'binary()'
184 $ fileset 'binary()'
185 $ fileset 'binary() and unknown()'
185 $ fileset 'binary() and unknown()'
186 bin
186 bin
@@ -219,8 +219,8 b' Test files properties'
219 $ hg --config ui.portablefilenames=ignore add con.xml
219 $ hg --config ui.portablefilenames=ignore add con.xml
220 #endif
220 #endif
221
221
222 >>> open('1k', 'wb').write(b' '*1024)
222 >>> open('1k', 'wb').write(b' '*1024) and None
223 >>> open('2k', 'wb').write(b' '*2048)
223 >>> open('2k', 'wb').write(b' '*2048) and None
224 $ hg add 1k 2k
224 $ hg add 1k 2k
225 $ fileset 'size("bar")'
225 $ fileset 'size("bar")'
226 hg: parse error: couldn't parse size: bar
226 hg: parse error: couldn't parse size: bar
@@ -391,9 +391,9 b' Test with a revision'
391 b2
391 b2
392 c1
392 c1
393
393
394 >>> open('dos', 'wb').write("dos\r\n")
394 >>> open('dos', 'wb').write(b"dos\r\n") and None
395 >>> open('mixed', 'wb').write("dos\r\nunix\n")
395 >>> open('mixed', 'wb').write(b"dos\r\nunix\n") and None
396 >>> open('mac', 'wb').write("mac\r")
396 >>> open('mac', 'wb').write(b"mac\r") and None
397 $ hg add dos mixed mac
397 $ hg add dos mixed mac
398
398
399 (remove a1, to examine safety of 'eol' on removed files)
399 (remove a1, to examine safety of 'eol' on removed files)
@@ -566,7 +566,7 b' Simulate a copy/paste turning LF into CR'
566 >>> fp = open('binary.diff', 'rb')
566 >>> fp = open('binary.diff', 'rb')
567 >>> data = fp.read()
567 >>> data = fp.read()
568 >>> fp.close()
568 >>> fp.close()
569 >>> open('binary.diff', 'wb').write(data.replace(b'\n', b'\r\n'))
569 >>> open('binary.diff', 'wb').write(data.replace(b'\n', b'\r\n')) and None
570 $ rm binary2
570 $ rm binary2
571 $ hg import --no-commit binary.diff
571 $ hg import --no-commit binary.diff
572 applying binary.diff
572 applying binary.diff
@@ -243,8 +243,8 b" Test issue 3764 (interpreting 'today' an"
243 >>> today = datetime.date.today().strftime("%b %d")
243 >>> today = datetime.date.today().strftime("%b %d")
244 >>> yesterday = (datetime.date.today() - datetime.timedelta(days=1)).strftime("%b %d")
244 >>> yesterday = (datetime.date.today() - datetime.timedelta(days=1)).strftime("%b %d")
245 >>> dates = open('dates', 'w')
245 >>> dates = open('dates', 'w')
246 >>> dates.write(today + '\n')
246 >>> dates.write(today + '\n') and None
247 >>> dates.write(yesterday + '\n')
247 >>> dates.write(yesterday + '\n') and None
248 >>> dates.close()
248 >>> dates.close()
249 $ hg ci -d "`sed -n '1p' dates`" -m "today is a good day to code"
249 $ hg ci -d "`sed -n '1p' dates`" -m "today is a good day to code"
250 $ hg log -d today --template '{desc}\n'
250 $ hg log -d today --template '{desc}\n'
@@ -4,7 +4,7 b''
4 Flags on revlog version 0 are rejected
4 Flags on revlog version 0 are rejected
5
5
6 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
6 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
7 ... fh.write(b'\x00\x01\x00\x00')
7 ... fh.write(b'\x00\x01\x00\x00') and None
8
8
9 $ hg log
9 $ hg log
10 abort: unknown flags (0x01) in version 0 revlog 00changelog.i!
10 abort: unknown flags (0x01) in version 0 revlog 00changelog.i!
@@ -13,7 +13,7 b' Flags on revlog version 0 are rejected'
13 Unknown flags on revlog version 1 are rejected
13 Unknown flags on revlog version 1 are rejected
14
14
15 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
15 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
16 ... fh.write(b'\x00\x04\x00\x01')
16 ... fh.write(b'\x00\x04\x00\x01') and None
17
17
18 $ hg log
18 $ hg log
19 abort: unknown flags (0x04) in version 1 revlog 00changelog.i!
19 abort: unknown flags (0x04) in version 1 revlog 00changelog.i!
@@ -22,7 +22,7 b' Unknown flags on revlog version 1 are re'
22 Unknown version is rejected
22 Unknown version is rejected
23
23
24 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
24 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
25 ... fh.write(b'\x00\x00\x00\x02')
25 ... fh.write(b'\x00\x00\x00\x02') and None
26
26
27 $ hg log
27 $ hg log
28 abort: unknown version (2) in revlog 00changelog.i!
28 abort: unknown version (2) in revlog 00changelog.i!
General Comments 0
You need to be logged in to leave comments. Login now