##// END OF EJS Templates
tests: suppress read(-1) -> '' calls in fileobjectobserver...
Augie Fackler -
r38334:565074cc default
parent child Browse files
Show More
@@ -450,6 +450,7 b' test-sparse-verbose-json.t'
450 450 test-sparse.t
451 451 test-split.t
452 452 test-ssh-clone-r.t
453 test-ssh-proto-unbundle.t
453 454 test-ssh-proto.t
454 455 test-sshserver.py
455 456 test-stack.t
@@ -782,6 +782,13 b' class fileobjectobserver(baseproxyobserv'
782 782 if res is None:
783 783 res = ''
784 784
785 if size == -1 and res == '':
786 # Suppress pointless read(-1) calls that return
787 # nothing. These happen _a lot_ on Python 3, and there
788 # doesn't seem to be a better workaround to have matching
789 # Python 2 and 3 behavior. :(
790 return
791
785 792 if self.logdataapis:
786 793 self.fh.write('%s> read(%d) -> %d' % (self.name, size, len(res)))
787 794
@@ -93,7 +93,6 b' Test pushing bundle1 payload to a server'
93 93 o> read(1) -> 1: 0
94 94 result: 0
95 95 remote output:
96 o> read(-1) -> 0:
97 96 e> read(-1) -> 115:
98 97 e> abort: incompatible Mercurial client; bundle2 required\n
99 98 e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
@@ -144,7 +143,6 b' Test pushing bundle1 payload to a server'
144 143 o> read(1) -> 1: 0
145 144 result: 0
146 145 remote output:
147 o> read(-1) -> 0:
148 146 e> read(-1) -> 115:
149 147 e> abort: incompatible Mercurial client; bundle2 required\n
150 148 e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
@@ -274,7 +272,6 b' ui.write() in hook is redirected to stde'
274 272 o> read(1) -> 1: 0
275 273 result: 0
276 274 remote output:
277 o> read(-1) -> 0:
278 275 e> read(-1) -> 196:
279 276 e> adding changesets\n
280 277 e> adding manifests\n
@@ -331,7 +328,6 b' ui.write() in hook is redirected to stde'
331 328 o> read(1) -> 1: 0
332 329 result: 0
333 330 remote output:
334 o> read(-1) -> 0:
335 331 e> read(-1) -> 196:
336 332 e> adding changesets\n
337 333 e> adding manifests\n
@@ -402,7 +398,6 b' And a variation that writes multiple lin'
402 398 o> read(1) -> 1: 0
403 399 result: 0
404 400 remote output:
405 o> read(-1) -> 0:
406 401 e> read(-1) -> 218:
407 402 e> adding changesets\n
408 403 e> adding manifests\n
@@ -460,7 +455,6 b' And a variation that writes multiple lin'
460 455 o> read(1) -> 1: 0
461 456 result: 0
462 457 remote output:
463 o> read(-1) -> 0:
464 458 e> read(-1) -> 218:
465 459 e> adding changesets\n
466 460 e> adding manifests\n
@@ -532,7 +526,6 b' And a variation that does a ui.flush() a'
532 526 o> read(1) -> 1: 0
533 527 result: 0
534 528 remote output:
535 o> read(-1) -> 0:
536 529 e> read(-1) -> 202:
537 530 e> adding changesets\n
538 531 e> adding manifests\n
@@ -589,7 +582,6 b' And a variation that does a ui.flush() a'
589 582 o> read(1) -> 1: 0
590 583 result: 0
591 584 remote output:
592 o> read(-1) -> 0:
593 585 e> read(-1) -> 202:
594 586 e> adding changesets\n
595 587 e> adding manifests\n
@@ -660,7 +652,6 b' Multiple writes + flush'
660 652 o> read(1) -> 1: 0
661 653 result: 0
662 654 remote output:
663 o> read(-1) -> 0:
664 655 e> read(-1) -> 206:
665 656 e> adding changesets\n
666 657 e> adding manifests\n
@@ -718,7 +709,6 b' Multiple writes + flush'
718 709 o> read(1) -> 1: 0
719 710 result: 0
720 711 remote output:
721 o> read(-1) -> 0:
722 712 e> read(-1) -> 206:
723 713 e> adding changesets\n
724 714 e> adding manifests\n
@@ -790,7 +780,6 b' ui.write() + ui.write_err() output is ca'
790 780 o> read(1) -> 1: 0
791 781 result: 0
792 782 remote output:
793 o> read(-1) -> 0:
794 783 e> read(-1) -> 232:
795 784 e> adding changesets\n
796 785 e> adding manifests\n
@@ -850,7 +839,6 b' ui.write() + ui.write_err() output is ca'
850 839 o> read(1) -> 1: 0
851 840 result: 0
852 841 remote output:
853 o> read(-1) -> 0:
854 842 e> read(-1) -> 232:
855 843 e> adding changesets\n
856 844 e> adding manifests\n
@@ -924,7 +912,6 b' print() output is captured'
924 912 o> read(1) -> 1: 0
925 913 result: 0
926 914 remote output:
927 o> read(-1) -> 0:
928 915 e> read(-1) -> 193:
929 916 e> adding changesets\n
930 917 e> adding manifests\n
@@ -981,7 +968,6 b' print() output is captured'
981 968 o> read(1) -> 1: 0
982 969 result: 0
983 970 remote output:
984 o> read(-1) -> 0:
985 971 e> read(-1) -> 193:
986 972 e> adding changesets\n
987 973 e> adding manifests\n
@@ -1052,7 +1038,6 b' Mixed print() and ui.write() are both ca'
1052 1038 o> read(1) -> 1: 0
1053 1039 result: 0
1054 1040 remote output:
1055 o> read(-1) -> 0:
1056 1041 e> read(-1) -> 218:
1057 1042 e> adding changesets\n
1058 1043 e> adding manifests\n
@@ -1112,7 +1097,6 b' Mixed print() and ui.write() are both ca'
1112 1097 o> read(1) -> 1: 0
1113 1098 result: 0
1114 1099 remote output:
1115 o> read(-1) -> 0:
1116 1100 e> read(-1) -> 218:
1117 1101 e> adding changesets\n
1118 1102 e> adding manifests\n
@@ -1186,7 +1170,6 b' print() to stdout and stderr both get ca'
1186 1170 o> read(1) -> 1: 0
1187 1171 result: 0
1188 1172 remote output:
1189 o> read(-1) -> 0:
1190 1173 e> read(-1) -> 216:
1191 1174 e> adding changesets\n
1192 1175 e> adding manifests\n
@@ -1246,7 +1229,6 b' print() to stdout and stderr both get ca'
1246 1229 o> read(1) -> 1: 0
1247 1230 result: 0
1248 1231 remote output:
1249 o> read(-1) -> 0:
1250 1232 e> read(-1) -> 216:
1251 1233 e> adding changesets\n
1252 1234 e> adding manifests\n
@@ -1326,7 +1308,6 b' Shell hook writing to stdout has output '
1326 1308 o> read(1) -> 1: 0
1327 1309 result: 0
1328 1310 remote output:
1329 o> read(-1) -> 0:
1330 1311 e> read(-1) -> 212:
1331 1312 e> adding changesets\n
1332 1313 e> adding manifests\n
@@ -1384,7 +1365,6 b' Shell hook writing to stdout has output '
1384 1365 o> read(1) -> 1: 0
1385 1366 result: 0
1386 1367 remote output:
1387 o> read(-1) -> 0:
1388 1368 e> read(-1) -> 212:
1389 1369 e> adding changesets\n
1390 1370 e> adding manifests\n
@@ -1457,7 +1437,6 b' Shell hook writing to stderr has output '
1457 1437 o> read(1) -> 1: 0
1458 1438 result: 0
1459 1439 remote output:
1460 o> read(-1) -> 0:
1461 1440 e> read(-1) -> 212:
1462 1441 e> adding changesets\n
1463 1442 e> adding manifests\n
@@ -1515,7 +1494,6 b' Shell hook writing to stderr has output '
1515 1494 o> read(1) -> 1: 0
1516 1495 result: 0
1517 1496 remote output:
1518 o> read(-1) -> 0:
1519 1497 e> read(-1) -> 212:
1520 1498 e> adding changesets\n
1521 1499 e> adding manifests\n
@@ -1590,7 +1568,6 b' Shell hook writing to stdout and stderr '
1590 1568 o> read(1) -> 1: 0
1591 1569 result: 0
1592 1570 remote output:
1593 o> read(-1) -> 0:
1594 1571 e> read(-1) -> 230:
1595 1572 e> adding changesets\n
1596 1573 e> adding manifests\n
@@ -1650,7 +1627,6 b' Shell hook writing to stdout and stderr '
1650 1627 o> read(1) -> 1: 0
1651 1628 result: 0
1652 1629 remote output:
1653 o> read(-1) -> 0:
1654 1630 e> read(-1) -> 230:
1655 1631 e> adding changesets\n
1656 1632 e> adding manifests\n
@@ -1733,7 +1709,6 b' Shell and Python hooks writing to stdout'
1733 1709 o> read(1) -> 1: 0
1734 1710 result: 0
1735 1711 remote output:
1736 o> read(-1) -> 0:
1737 1712 e> read(-1) -> 273:
1738 1713 e> adding changesets\n
1739 1714 e> adding manifests\n
@@ -1797,7 +1772,6 b' Shell and Python hooks writing to stdout'
1797 1772 o> read(1) -> 1: 0
1798 1773 result: 0
1799 1774 remote output:
1800 o> read(-1) -> 0:
1801 1775 e> read(-1) -> 273:
1802 1776 e> adding changesets\n
1803 1777 e> adding manifests\n
@@ -1875,7 +1849,6 b' Pushing a bundle1 with no output'
1875 1849 o> read(1) -> 1: 1
1876 1850 result: 1
1877 1851 remote output:
1878 o> read(-1) -> 0:
1879 1852 e> read(-1) -> 100:
1880 1853 e> adding changesets\n
1881 1854 e> adding manifests\n
@@ -1928,7 +1901,6 b' Pushing a bundle1 with no output'
1928 1901 o> read(1) -> 1: 1
1929 1902 result: 1
1930 1903 remote output:
1931 o> read(-1) -> 0:
1932 1904 e> read(-1) -> 100:
1933 1905 e> adding changesets\n
1934 1906 e> adding manifests\n
@@ -2007,7 +1979,6 b' Pushing a bundle1 with ui.write() and ui'
2007 1979 o> read(1) -> 1: 1
2008 1980 result: 1
2009 1981 remote output:
2010 o> read(-1) -> 0:
2011 1982 e> read(-1) -> 152:
2012 1983 e> adding changesets\n
2013 1984 e> adding manifests\n
@@ -2064,7 +2035,6 b' Pushing a bundle1 with ui.write() and ui'
2064 2035 o> read(1) -> 1: 1
2065 2036 result: 1
2066 2037 remote output:
2067 o> read(-1) -> 0:
2068 2038 e> read(-1) -> 152:
2069 2039 e> adding changesets\n
2070 2040 e> adding manifests\n
@@ -1154,7 +1154,6 b' Multiple upgrades is not allowed'
1154 1154 i> hello\n
1155 1155 o> readline() -> 1:
1156 1156 o> \n
1157 o> read(-1) -> 0:
1158 1157 e> read(-1) -> 42:
1159 1158 e> cannot upgrade protocols multiple times\n
1160 1159 e> -\n
@@ -1246,7 +1245,6 b' Upgrade request must be followed by hell'
1246 1245 i> invalid\n
1247 1246 o> readline() -> 1:
1248 1247 o> \n
1249 o> read(-1) -> 0:
1250 1248 e> read(-1) -> 46:
1251 1249 e> malformed handshake protocol: missing hello\n
1252 1250 e> -\n
@@ -1266,7 +1264,6 b' Upgrade request must be followed by hell'
1266 1264 i> invalid\n
1267 1265 o> readline() -> 1:
1268 1266 o> \n
1269 o> read(-1) -> 0:
1270 1267 e> read(-1) -> 48:
1271 1268 e> malformed handshake protocol: missing between\n
1272 1269 e> -\n
@@ -1288,7 +1285,6 b' Upgrade request must be followed by hell'
1288 1285 i> invalid\n
1289 1286 o> readline() -> 1:
1290 1287 o> \n
1291 o> read(-1) -> 0:
1292 1288 e> read(-1) -> 49:
1293 1289 e> malformed handshake protocol: missing pairs 81\n
1294 1290 e> -\n
General Comments 0
You need to be logged in to leave comments. Login now