Mercurial > public > mercurial-scm > hg
comparison tests/test-sshserver.py @ 36212:7a46f0735904
py3: add b'' to test-sshserver.py
# skip-blame because adding b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D2273
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 14 Feb 2018 17:23:26 -0700 |
parents | bf676267f64f |
children | 3b3a987bbbaa |
comparison
equal
deleted
inserted
replaced
36211:30cc9f9780df | 36212:7a46f0735904 |
---|---|
12 ) | 12 ) |
13 | 13 |
14 class SSHServerGetArgsTests(unittest.TestCase): | 14 class SSHServerGetArgsTests(unittest.TestCase): |
15 def testparseknown(self): | 15 def testparseknown(self): |
16 tests = [ | 16 tests = [ |
17 ('* 0\nnodes 0\n', ['', {}]), | 17 (b'* 0\nnodes 0\n', [b'', {}]), |
18 ('* 0\nnodes 40\n1111111111111111111111111111111111111111\n', | 18 (b'* 0\nnodes 40\n1111111111111111111111111111111111111111\n', |
19 ['1111111111111111111111111111111111111111', {}]), | 19 [b'1111111111111111111111111111111111111111', {}]), |
20 ] | 20 ] |
21 for input, expected in tests: | 21 for input, expected in tests: |
22 self.assertparse('known', input, expected) | 22 self.assertparse(b'known', input, expected) |
23 | 23 |
24 def assertparse(self, cmd, input, expected): | 24 def assertparse(self, cmd, input, expected): |
25 server = mockserver(input) | 25 server = mockserver(input) |
26 _func, spec = wireproto.commands[cmd] | 26 _func, spec = wireproto.commands[cmd] |
27 self.assertEqual(server._proto.getargs(spec), expected) | 27 self.assertEqual(server._proto.getargs(spec), expected) |