D3733: tests: suppress read(-1) -> '' calls in fileobjectobserver
indygreg added a comment. So Python 3 is performing a lot more `read(-1)` calls than Python 2? That, uh, seems weird and might be worth investigating. Hiding the `read()` calls does undermine the tests somewhat. But it's not a deal breaker. Let's keep this commit and keep this excessive `read(-1)` issue in the back of our heads. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3733 To: durin42, pulkit, #hg-reviewers Cc: indygreg, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3733: tests: suppress read(-1) -> '' calls in fileobjectobserver
This revision was automatically updated to reflect the committed changes. Closed by commit rHG565074cc9ac6: tests: suppress read(-1) - calls in fileobjectobserver (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3733?vs=9058=9081 REVISION DETAIL https://phab.mercurial-scm.org/D3733 AFFECTED FILES contrib/python3-whitelist mercurial/util.py tests/test-ssh-proto-unbundle.t tests/test-ssh-proto.t CHANGE DETAILS diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t --- a/tests/test-ssh-proto.t +++ b/tests/test-ssh-proto.t @@ -1154,7 +1154,6 @@ i> hello\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 42: e> cannot upgrade protocols multiple times\n e> -\n @@ -1246,7 +1245,6 @@ i> invalid\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 46: e> malformed handshake protocol: missing hello\n e> -\n @@ -1266,7 +1264,6 @@ i> invalid\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 48: e> malformed handshake protocol: missing between\n e> -\n @@ -1288,7 +1285,6 @@ i> invalid\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 49: e> malformed handshake protocol: missing pairs 81\n e> -\n diff --git a/tests/test-ssh-proto-unbundle.t b/tests/test-ssh-proto-unbundle.t --- a/tests/test-ssh-proto-unbundle.t +++ b/tests/test-ssh-proto-unbundle.t @@ -93,7 +93,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 115: e> abort: incompatible Mercurial client; bundle2 required\n e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n @@ -144,7 +143,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 115: e> abort: incompatible Mercurial client; bundle2 required\n e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n @@ -274,7 +272,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 196: e> adding changesets\n e> adding manifests\n @@ -331,7 +328,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 196: e> adding changesets\n e> adding manifests\n @@ -402,7 +398,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -460,7 +455,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -532,7 +526,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 202: e> adding changesets\n e> adding manifests\n @@ -589,7 +582,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 202: e> adding changesets\n e> adding manifests\n @@ -660,7 +652,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 206: e> adding changesets\n e> adding manifests\n @@ -718,7 +709,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 206: e> adding changesets\n e> adding manifests\n @@ -790,7 +780,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 232: e> adding changesets\n e> adding manifests\n @@ -850,7 +839,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 232: e> adding changesets\n e> adding manifests\n @@ -924,7 +912,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 193: e> adding changesets\n e> adding manifests\n @@ -981,7 +968,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 193: e> adding changesets\n e> adding manifests\n @@ -1052,7 +1038,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -1112,7 +1097,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -1186,7 +1170,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 216: e> adding changesets\n e> adding manifests\n @@ -1246,7 +1229,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 216: e> adding changesets\n e> adding manifests\n @@ -1326,7 +1308,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o>
D3733: tests: suppress read(-1) -> '' calls in fileobjectobserver
durin42 created this revision. Herald added a reviewer: pulkit. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This stabilizes the test output of the low-level wireproto tests between Python 2 and 3. I don't feel great about this change, but otherwise we get a ton of extra read(-1) output on Python 3, and this feels like a more sustainable solution. Bonus: test-ssh-proto-unbundle.t now passes on Python 3. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3733 AFFECTED FILES contrib/python3-whitelist mercurial/util.py tests/test-ssh-proto-unbundle.t tests/test-ssh-proto.t CHANGE DETAILS diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t --- a/tests/test-ssh-proto.t +++ b/tests/test-ssh-proto.t @@ -1154,7 +1154,6 @@ i> hello\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 42: e> cannot upgrade protocols multiple times\n e> -\n @@ -1246,7 +1245,6 @@ i> invalid\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 46: e> malformed handshake protocol: missing hello\n e> -\n @@ -1266,7 +1264,6 @@ i> invalid\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 48: e> malformed handshake protocol: missing between\n e> -\n @@ -1288,7 +1285,6 @@ i> invalid\n o> readline() -> 1: o> \n - o> read(-1) -> 0: e> read(-1) -> 49: e> malformed handshake protocol: missing pairs 81\n e> -\n diff --git a/tests/test-ssh-proto-unbundle.t b/tests/test-ssh-proto-unbundle.t --- a/tests/test-ssh-proto-unbundle.t +++ b/tests/test-ssh-proto-unbundle.t @@ -93,7 +93,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 115: e> abort: incompatible Mercurial client; bundle2 required\n e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n @@ -144,7 +143,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 115: e> abort: incompatible Mercurial client; bundle2 required\n e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n @@ -274,7 +272,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 196: e> adding changesets\n e> adding manifests\n @@ -331,7 +328,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 196: e> adding changesets\n e> adding manifests\n @@ -402,7 +398,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -460,7 +455,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -532,7 +526,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 202: e> adding changesets\n e> adding manifests\n @@ -589,7 +582,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 202: e> adding changesets\n e> adding manifests\n @@ -660,7 +652,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 206: e> adding changesets\n e> adding manifests\n @@ -718,7 +709,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 206: e> adding changesets\n e> adding manifests\n @@ -790,7 +780,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 232: e> adding changesets\n e> adding manifests\n @@ -850,7 +839,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 232: e> adding changesets\n e> adding manifests\n @@ -924,7 +912,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 193: e> adding changesets\n e> adding manifests\n @@ -981,7 +968,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 193: e> adding changesets\n e> adding manifests\n @@ -1052,7 +1038,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -1112,7 +1097,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 218: e> adding changesets\n e> adding manifests\n @@ -1186,7 +1170,6 @@ o> read(1) -> 1: 0 result: 0 remote output: - o> read(-1) -> 0: e> read(-1) -> 216: e> adding changesets\n e> adding manifests\n @@ -1246,7 +1229,6 @@ o> read(1) -> 1: 0 result: 0 remote