tests/test-hybridencode.py
author Georges Racinet <georges.racinet@octobus.net>
Fri, 27 Oct 2023 22:11:05 +0200
changeset 51239 7eea2e4109ae
parent 48875 6000f5b25c9b
child 51690 493034cc3265
permissions -rw-r--r--
rust-index: using the `hg::index::Index` in ancestors iterator and lazy set Since there is no Rust implementation for REVLOGV2/CHANGELOGv2, we declare them to be incompatible with Rust, hence indexes in these formats will use the implementations from Python `mercurial.ancestor`. If this is an unacceptable performance hit for current users of these formats, we can later on add Rust implementations based on the C index for them or implement these formats for the Rust indexes. Among the challenges that we had to meet, we wanted to avoid taking the GIL each time the inner (vcsgraph) iterator has to call the parents function. This would probably still be acceptable in terms of performance with `AncestorsIterator`, but not with `LazyAncestors` nor for the upcoming change in `MissingAncestors`. Hence we enclose the reference to the index in a `PySharedRef`, leading to more rigourous checking of mutations, which does pass now that there no logically immutable methods of `hg::index::Index` that take a mutable reference as input.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
     1
import unittest
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
     2
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
     3
from mercurial import store
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
     4
7275
c00cdac22d3c add new test-hybridencode.py
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     5
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
     6
class hybridencodetests(unittest.TestCase):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
     7
    def hybridencode(self, input, want):
17622
57bf86677daa test-hybridencode: use store._dothybridencode(s)
Adrian Buehlmann <adrian@cadifra.com>
parents: 17617
diff changeset
     8
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
     9
        # Check the C implementation if it's in use
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    10
        got = store._pathencode(input)
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    11
        self.assertEqual(want, got)
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    12
        # Check the reference implementation in Python
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    13
        refgot = store._hybridencode(input, True)
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    14
        self.assertEqual(want, refgot)
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
    15
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    16
    def testnoencodingrequired(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    17
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    18
            b'data/abcdefghijklmnopqrstuvwxyz0123456789 !#%&\'()+,-.;=[]^`{}',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    19
            b'data/abcdefghijklmnopqrstuvwxyz0123456789 !#%&\'()+,-.;=[]^`{}',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    20
        )
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
    21
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    22
    def testuppercasechars(self):  # uppercase char X is encoded as _x
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    23
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    24
            b'data/ABCDEFGHIJKLMNOPQRSTUVWXYZ',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    25
            b'data/_a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    26
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    27
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    28
    def testunderbar(self):  # underbar is doubled
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    29
        self.hybridencode(b'data/_', b'data/__')
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
    30
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    31
    def testtilde(self):  # tilde is character-encoded
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    32
        self.hybridencode(b'data/~', b'data/~7e')
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
    33
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    34
    def testcontrolchars(self):  # characters in ASCII code range 1..31
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    35
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    36
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    37
                b'data/\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    38
                b'\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    39
                b'\x1f'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    40
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    41
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    42
                b'data/~01~02~03~04~05~06~07~08~09~0a~0b~0c~0d~0e~0f~10~11~12~13'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    43
                b'~14~15~16~17~18~19~1a~1b~1c~1d~1e~1f'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    44
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    45
        )
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
    46
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    47
    def testhighascii(self):  # characters in ASCII code range 126..255
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    48
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    49
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    50
                b'data/~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    51
                b'\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    52
                b'\x9c\x9d\x9e\x9f'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    53
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    54
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    55
                b'data/~7e~7f~80~81~82~83~84~85~86~87~88~89~8a~8b~8c~8d~8e~8f~90'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    56
                b'~91~92~93~94~95~96~97~98~99~9a~9b~9c~9d~9e~9f'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    57
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    58
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    59
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    60
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    61
                b'data/\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    62
                b'\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    63
                b'\xbd\xbe\xbf'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    64
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    65
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    66
                b'data/~a0~a1~a2~a3~a4~a5~a6~a7~a8~a9~aa~ab~ac~ad~ae~af~b0~b1~b2'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    67
                b'~b3~b4~b5~b6~b7~b8~b9~ba~bb~bc~bd~be~bf'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    68
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    69
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    70
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    71
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    72
                b'data/\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    73
                b'\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    74
                b'\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    75
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    76
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    77
                b'data/~c0~c1~c2~c3~c4~c5~c6~c7~c8~c9~ca~cb~cc~cd~ce~cf~d0~d1~d2'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    78
                b'~d3~d4~d5~d6~d7~d8~d9~da~db~dc~dd~de~df'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    79
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    80
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    81
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    82
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    83
                b'data/\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    84
                b'\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    85
                b'\xfe\xff'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    86
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    87
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    88
                b'data/~e0~e1~e2~e3~e4~e5~e6~e7~e8~e9~ea~eb~ec~ed~ee~ef~f0~f1~f2'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    89
                b'~f3~f4~f5~f6~f7~f8~f9~fa~fb~fc~fd~fe~ff'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    90
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    91
        )
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
    92
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    93
    def testwinreserved(self):  # Windows reserved characters
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
    94
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    95
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    96
                b'data/less <, greater >, colon :, double-quote ", backslash \\, '
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    97
                b'pipe |, question-mark ?, asterisk *'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    98
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
    99
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   100
                b'data/less ~3c, greater ~3e, colon ~3a, double-quote ~22, '
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   101
                b'backslash ~5c, pipe ~7c, question-mark ~3f, asterisk ~2a'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   102
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   103
        )
7275
c00cdac22d3c add new test-hybridencode.py
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   104
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   105
    def testhgreserved(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   106
        # encoding directories ending in .hg, .i or .d with '.hg' suffix
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   107
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   108
            b'data/x.h.i/x.hg/x.i/x.d/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   109
            b'data/x.h.i.hg/x.hg.hg/x.i.hg/x.d.hg/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   110
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   111
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   112
            b'data/a.hg/a.i/a.d/foo', b'data/a.hg.hg/a.i.hg/a.d.hg/foo'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   113
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   114
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   115
            b'data/au.hg/au.i/au.d/foo', b'data/au.hg.hg/au.i.hg/au.d.hg/foo'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   116
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   117
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   118
            b'data/aux.hg/aux.i/aux.d/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   119
            b'data/au~78.hg.hg/au~78.i.hg/au~78.d.hg/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   120
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   121
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   122
            b'data/auxy.hg/auxy.i/auxy.d/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   123
            b'data/auxy.hg.hg/auxy.i.hg/auxy.d.hg/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   124
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   125
        # but these are not encoded on *filenames*
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   126
        self.hybridencode(b'data/foo/x.hg', b'data/foo/x.hg')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   127
        self.hybridencode(b'data/foo/x.i', b'data/foo/x.i')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   128
        self.hybridencode(b'data/foo/x.d', b'data/foo/x.d')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   129
        self.hybridencode(b'data/foo/a.hg', b'data/foo/a.hg')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   130
        self.hybridencode(b'data/foo/a.i', b'data/foo/a.i')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   131
        self.hybridencode(b'data/foo/a.d', b'data/foo/a.d')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   132
        self.hybridencode(b'data/foo/au.hg', b'data/foo/au.hg')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   133
        self.hybridencode(b'data/foo/au.i', b'data/foo/au.i')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   134
        self.hybridencode(b'data/foo/au.d', b'data/foo/au.d')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   135
        self.hybridencode(b'data/foo/aux.hg', b'data/foo/au~78.hg')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   136
        self.hybridencode(b'data/foo/aux.i', b'data/foo/au~78.i')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   137
        self.hybridencode(b'data/foo/aux.d', b'data/foo/au~78.d')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   138
        self.hybridencode(b'data/foo/auxy.hg', b'data/foo/auxy.hg')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   139
        self.hybridencode(b'data/foo/auxy.i', b'data/foo/auxy.i')
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   140
        self.hybridencode(b'data/foo/auxy.d', b'data/foo/auxy.d')
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
   141
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   142
        # plain .hg, .i and .d directories have the leading dot encoded
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   143
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   144
            b'data/.hg/.i/.d/foo', b'data/~2ehg.hg/~2ei.hg/~2ed.hg/foo'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   145
        )
17432
61bd77b57c86 test-hybridencode: more testcases
Adrian Buehlmann <adrian@cadifra.com>
parents: 17404
diff changeset
   146
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   147
    def testmisclongcases(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   148
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   149
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   150
                b'data/aux.bla/bla.aux/prn/PRN/lpt/com3/nul/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   151
                b'coma/foo.NUL/normal.c.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   152
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   153
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   154
                b'data/au~78.bla/bla.aux/pr~6e/_p_r_n/lpt/co~6d3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   155
                b'/nu~6c/coma/foo._n_u_l/normal.c.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   156
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   157
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   158
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   159
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   160
                b'data/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   161
                b'/TENTH/ELEVENTH/LOREMIPSUM.TXT.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   162
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   163
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   164
                b'dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   165
                b'nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   166
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   167
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   168
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   169
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   170
                b'data/enterprise/openesbaddons/contrib-imola/corba-bc/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   171
                b'netbeansplugin/wsdlExtension/src/main/java/META-INF/services'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   172
                b'/org.netbeans.modules.xml.wsdl.bindingsupport.spi.'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   173
                b'ExtensibilityElementTemplateProvider.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   174
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   175
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   176
                b'dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   177
                b'main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   178
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   179
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   180
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   181
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   182
                b'data/AUX.THE-QUICK-BROWN-FOX-JU:MPS-OVER-THE-LAZY-DOG-THE-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   183
                b'QUICK-BROWN-FOX-JUMPS-OVER-THE-LAZY-DOG.TXT.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   184
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   185
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   186
                b'dh/au~78.the-quick-brown-fox-ju~3amps-over-the-lazy-dog-the-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   187
                b'quick-brown-fox-jud4dcadd033000ab2b26eb66bae1906bcb15d4a70.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   188
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   189
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   190
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   191
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   192
                b'data/Project Planning/Resources/AnotherLongDirectoryName/Follow'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   193
                b'edbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   194
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   195
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   196
                b'dh/project_/resource/anotherl/followed/andanoth/andthenanextrem'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   197
                b'elylongfilenaf93030515d9849cfdca52937c2204d19f83913e5.txt'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   198
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   199
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   200
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   201
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   202
                b'data/Project.Planning/Resources/AnotherLongDirectoryName/Follo'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   203
                b'wedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   204
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   205
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   206
                b'dh/project_/resource/anotherl/followed/andanoth/andthenanextre'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   207
                b'melylongfilena0fd7c506f5c9d58204444fc67e9499006bd2d445.txt'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   208
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   209
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   210
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   211
            b'data/foo.../foo   / /a./_. /__/.x../    bla/.FOO/something.i',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   212
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   213
                b'data/foo..~2e/foo  ~20/~20/a~2e/__.~20/____/~2ex.~2e/~20   bla/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   214
                b'~2e_f_o_o/something.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   215
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   216
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   217
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   218
            b'data/c/co/com/com0/com1/com2/com3/com4/com5/com6/com7/com8/com9',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   219
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   220
                b'data/c/co/com/com0/co~6d1/co~6d2/co~6d3/co~6d4/co~6d5/co~6d6/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   221
                b'co~6d7/co~6d8/co~6d9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   222
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   223
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   224
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   225
            b'data/C/CO/COM/COM0/COM1/COM2/COM3/COM4/COM5/COM6/COM7/COM8/COM9',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   226
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   227
                b'data/_c/_c_o/_c_o_m/_c_o_m0/_c_o_m1/_c_o_m2/_c_o_m3/_c_o_m4/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   228
                b'_c_o_m5/_c_o_m6/_c_o_m7/_c_o_m8/_c_o_m9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   229
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   230
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   231
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   232
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   233
                b'data/c.x/co.x/com.x/com0.x/com1.x/com2.x/com3.x/com4.x/com5.x/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   234
                b'com6.x/com7.x/com8.x/com9.x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   235
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   236
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   237
                b'data/c.x/co.x/com.x/com0.x/co~6d1.x/co~6d2.x/co~6d3.x/co~6d4.x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   238
                b'/co~6d5.x/co~6d6.x/co~6d7.x/co~6d8.x/co~6d9.x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   239
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   240
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   241
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   242
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   243
                b'data/x.c/x.co/x.com0/x.com1/x.com2/x.com3/x.com4/x.com5/x.com6'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   244
                b'/x.com7/x.com8/x.com9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   245
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   246
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   247
                b'data/x.c/x.co/x.com0/x.com1/x.com2/x.com3/x.com4/x.com5/x.com6'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   248
                b'/x.com7/x.com8/x.com9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   249
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   250
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   251
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   252
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   253
                b'data/cx/cox/comx/com0x/com1x/com2x/com3x/com4x/com5x/com6x/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   254
                b'com7x/com8x/com9x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   255
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   256
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   257
                b'data/cx/cox/comx/com0x/com1x/com2x/com3x/com4x/com5x/com6x/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   258
                b'com7x/com8x/com9x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   259
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   260
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   261
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   262
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   263
                b'data/xc/xco/xcom0/xcom1/xcom2/xcom3/xcom4/xcom5/xcom6/xcom7/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   264
                b'xcom8/xcom9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   265
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   266
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   267
                b'data/xc/xco/xcom0/xcom1/xcom2/xcom3/xcom4/xcom5/xcom6/xcom7/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   268
                b'xcom8/xcom9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   269
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   270
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   271
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   272
            b'data/l/lp/lpt/lpt0/lpt1/lpt2/lpt3/lpt4/lpt5/lpt6/lpt7/lpt8/lpt9',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   273
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   274
                b'data/l/lp/lpt/lpt0/lp~741/lp~742/lp~743/lp~744/lp~745/lp~746/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   275
                b'lp~747/lp~748/lp~749'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   276
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   277
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   278
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   279
            b'data/L/LP/LPT/LPT0/LPT1/LPT2/LPT3/LPT4/LPT5/LPT6/LPT7/LPT8/LPT9',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   280
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   281
                b'data/_l/_l_p/_l_p_t/_l_p_t0/_l_p_t1/_l_p_t2/_l_p_t3/_l_p_t4/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   282
                b'_l_p_t5/_l_p_t6/_l_p_t7/_l_p_t8/_l_p_t9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   283
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   284
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   285
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   286
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   287
                b'data/l.x/lp.x/lpt.x/lpt0.x/lpt1.x/lpt2.x/lpt3.x/lpt4.x/lpt5.x/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   288
                b'lpt6.x/lpt7.x/lpt8.x/lpt9.x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   289
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   290
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   291
                b'data/l.x/lp.x/lpt.x/lpt0.x/lp~741.x/lp~742.x/lp~743.x/lp~744.x/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   292
                b'lp~745.x/lp~746.x/lp~747.x/lp~748.x/lp~749.x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   293
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   294
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   295
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   296
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   297
                b'data/x.l/x.lp/x.lpt/x.lpt0/x.lpt1/x.lpt2/x.lpt3/x.lpt4/x.lpt5/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   298
                b'x.lpt6/x.lpt7/x.lpt8/x.lpt9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   299
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   300
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   301
                b'data/x.l/x.lp/x.lpt/x.lpt0/x.lpt1/x.lpt2/x.lpt3/x.lpt4/x.lpt5'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   302
                b'/x.lpt6/x.lpt7/x.lpt8/x.lpt9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   303
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   304
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   305
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   306
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   307
                b'data/lx/lpx/lptx/lpt0x/lpt1x/lpt2x/lpt3x/lpt4x/lpt5x/lpt6x/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   308
                b'lpt7x/lpt8x/lpt9x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   309
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   310
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   311
                b'data/lx/lpx/lptx/lpt0x/lpt1x/lpt2x/lpt3x/lpt4x/lpt5x/lpt6x/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   312
                b'lpt7x/lpt8x/lpt9x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   313
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   314
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   315
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   316
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   317
                b'data/xl/xlp/xlpt/xlpt0/xlpt1/xlpt2/xlpt3/xlpt4/xlpt5/xlpt6/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   318
                b'xlpt7/xlpt8/xlpt9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   319
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   320
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   321
                b'data/xl/xlp/xlpt/xlpt0/xlpt1/xlpt2/xlpt3/xlpt4/xlpt5/xlpt6/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   322
                b'xlpt7/xlpt8/xlpt9'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   323
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   324
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   325
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   326
            b'data/con/p/pr/prn/a/au/aux/n/nu/nul',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   327
            b'data/co~6e/p/pr/pr~6e/a/au/au~78/n/nu/nu~6c',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   328
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   329
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   330
            b'data/CON/P/PR/PRN/A/AU/AUX/N/NU/NUL',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   331
            b'data/_c_o_n/_p/_p_r/_p_r_n/_a/_a_u/_a_u_x/_n/_n_u/_n_u_l',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   332
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   333
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   334
            b'data/con.x/p.x/pr.x/prn.x/a.x/au.x/aux.x/n.x/nu.x/nul.x',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   335
            b'data/co~6e.x/p.x/pr.x/pr~6e.x/a.x/au.x/au~78.x/n.x/nu.x/nu~6c.x',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   336
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   337
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   338
            b'data/x.con/x.p/x.pr/x.prn/x.a/x.au/x.aux/x.n/x.nu/x.nul',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   339
            b'data/x.con/x.p/x.pr/x.prn/x.a/x.au/x.aux/x.n/x.nu/x.nul',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   340
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   341
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   342
            b'data/conx/px/prx/prnx/ax/aux/auxx/nx/nux/nulx',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   343
            b'data/conx/px/prx/prnx/ax/au~78/auxx/nx/nux/nulx',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   344
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   345
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   346
            b'data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   347
            b'data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   348
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   349
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   350
            b'data/a./au./aux./auxy./aux.',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   351
            b'data/a~2e/au~2e/au~78~2e/auxy~2e/au~78~2e',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   352
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   353
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   354
            b'data/c./co./con./cony./con.',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   355
            b'data/c~2e/co~2e/co~6e~2e/cony~2e/co~6e~2e',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   356
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   357
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   358
            b'data/p./pr./prn./prny./prn.',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   359
            b'data/p~2e/pr~2e/pr~6e~2e/prny~2e/pr~6e~2e',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   360
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   361
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   362
            b'data/n./nu./nul./nuly./nul.',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   363
            b'data/n~2e/nu~2e/nu~6c~2e/nuly~2e/nu~6c~2e',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   364
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   365
        self.hybridencode(
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   366
            b'data/l./lp./lpt./lpt1./lpt1y./lpt1.',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   367
            b'data/l~2e/lp~2e/lpt~2e/lp~741~2e/lpt1y~2e/lp~741~2e',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   368
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   369
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   370
            b'data/lpt9./lpt9y./lpt9.', b'data/lp~749~2e/lpt9y~2e/lp~749~2e'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   371
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   372
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   373
            b'data/com./com1./com1y./com1.',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   374
            b'data/com~2e/co~6d1~2e/com1y~2e/co~6d1~2e',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   375
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   376
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   377
            b'data/com9./com9y./com9.', b'data/co~6d9~2e/com9y~2e/co~6d9~2e'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   378
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   379
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   380
            b'data/a /au /aux /auxy /aux ',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   381
            b'data/a~20/au~20/aux~20/auxy~20/aux~20',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   382
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   383
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   384
    def testhashingboundarycases(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   385
        # largest unhashed path
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   386
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   387
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   388
                b'data/123456789-123456789-123456789-123456789-123456789-unhashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   389
                b'--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   390
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   391
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   392
                b'data/123456789-123456789-123456789-123456789-123456789-unhashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   393
                b'--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   394
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   395
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   396
        # shortest hashed path
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   397
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   398
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   399
                b'data/123456789-123456789-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   400
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   401
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   402
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   403
                b'dh/123456789-123456789-123456789-123456789-123456789-hashed---'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   404
                b'-xxxxxxxxx-xxxxxxxe9c55002b50bf5181e7a6fc1f60b126e2a6fcf71'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   405
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   406
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   407
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   408
    def testhashing(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   409
        # changing one char in part that's hashed away produces a different hash
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   410
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   411
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   412
                b'data/123456789-123456789-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   413
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxy-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   414
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   415
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   416
                b'dh/123456789-123456789-123456789-123456789-123456789-hashed---'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   417
                b'-xxxxxxxxx-xxxxxxxd24fa4455faf8a94350c18e5eace7c2bb17af706'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   418
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   419
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   420
        # uppercase hitting length limit due to encoding
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   421
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   422
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   423
                b'data/A23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   424
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   425
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   426
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   427
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   428
                b'dh/a23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   429
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   430
                b'cbbc657029b41b94ed510d05feb6716a5c03bc6b'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   431
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   432
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   433
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   434
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   435
                b'data/Z23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   436
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   437
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   438
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   439
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   440
                b'dh/z23456789-123456789-123456789-123456789-123456789-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   441
                b'-xxxxxxxxx-xxxxxxx938f32a725c89512833fb96b6602dd9ebff51ddd'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   442
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   443
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   444
        # compare with lowercase not hitting limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   445
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   446
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   447
                b'data/a23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   448
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   449
                b'12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   450
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   451
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   452
                b'data/a23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   453
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   454
                b'12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   455
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   456
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   457
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   458
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   459
                b'data/z23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   460
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   461
                b'-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   462
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   463
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   464
                b'data/z23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   465
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   466
                b'12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   467
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   468
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   469
        # not hitting limit with any of these
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   470
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   471
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   472
                b'data/abcdefghijklmnopqrstuvwxyz0123456789 !#%&\'()+,-.;=[]^`{}'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   473
                b'xxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   474
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   475
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   476
                b'data/abcdefghijklmnopqrstuvwxyz0123456789 !#%&\'()+,-.;=[]^`{}'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   477
                b'xxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   478
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   479
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   480
        # underbar hitting length limit due to encoding
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   481
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   482
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   483
                b'data/_23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   484
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   485
                b'12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   486
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   487
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   488
                b'dh/_23456789-123456789-123456789-123456789-123456789-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   489
                b'xxxxxxxxx-xxxxxxx9921a01af50feeabc060ce00eee4cba6efc31d2b'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   490
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   491
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   492
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   493
        # tilde hitting length limit due to encoding
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   494
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   495
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   496
                b'data/~23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   497
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   498
                b'12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   499
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   500
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   501
                b'dh/~7e23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   502
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   503
                b'9cec6f97d569c10995f785720044ea2e4227481b'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   504
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   505
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   506
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   507
    def testwinreservedoverlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   508
        # Windows reserved characters hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   509
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   510
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   511
                b'data/<23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   512
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   513
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   514
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   515
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   516
                b'dh/~3c23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   517
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxee'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   518
                b'67d8f275876ca1ef2500fc542e63c885c4e62d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   519
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   520
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   521
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   522
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   523
                b'data/>23456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   524
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   525
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   526
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   527
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   528
                b'dh/~3e23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   529
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   530
                b'387a85a5b1547cc9136310c974df716818458ddb'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   531
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   532
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   533
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   534
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   535
                b'data/:23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   536
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   537
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   538
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   539
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   540
                b'dh/~3a23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   541
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   542
                b'2e4154fb571d13d22399c58cc4ef4858e4b75999'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   543
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   544
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   545
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   546
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   547
                b'data/"23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   548
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   549
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   550
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   551
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   552
                b'dh/~2223456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   553
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   554
                b'fc7e3ec7b0687ee06ed8c32fef0eb0c1980259f5'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   555
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   556
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   557
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   558
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   559
                b'data/\\23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   560
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   561
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   562
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   563
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   564
                b'dh/~5c23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   565
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   566
                b'944e1f2b7110687e116e0d151328ac648b06ab4a'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   567
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   568
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   569
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   570
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   571
                b'data/|23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   572
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   573
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   574
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   575
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   576
                b'dh/~7c23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   577
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   578
                b'28b23dd3fd0242946334126ab62bcd772aac32f4'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   579
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   580
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   581
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   582
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   583
                b'data/?23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   584
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   585
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   586
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   587
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   588
                b'dh/~3f23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   589
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   590
                b'a263022d3994d2143d98f94f431eef8b5e7e0f8a'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   591
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   592
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   593
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   594
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   595
                b'data/*23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   596
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   597
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   598
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   599
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   600
                b'dh/~2a23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   601
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   602
                b'0e7e6020e3c00ba7bb7893d84ca2966fbf53e140'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   603
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   604
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   605
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   606
    def testinitialspacelenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   607
        # initial space hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   608
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   609
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   610
                b'data/ 23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   611
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   612
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   613
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   614
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   615
                b'dh/~2023456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   616
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   617
                b'92acbc78ef8c0b796111629a02601f07d8aec4ea'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   618
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   619
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   620
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   621
    def testinitialdotlenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   622
        # initial dot hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   623
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   624
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   625
                b'data/.23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   626
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   627
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   628
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   629
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   630
                b'dh/~2e23456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   631
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   632
                b'dbe19cc6505b3515ab9228cebf877ad07075168f'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   633
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   634
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   635
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   636
    def testtrailingspacelenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   637
        # trailing space in filename hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   638
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   639
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   640
                b'data/123456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   641
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   642
                b'123456789-1234 '
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   643
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   644
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   645
                b'dh/123456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   646
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   647
                b'0025dc73e04f97426db4893e3bf67d581dc6d066'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   648
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   649
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   650
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   651
    def testtrailingdotlenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   652
        # trailing dot in filename hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   653
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   654
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   655
                b'data/123456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   656
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   657
                b'1234.'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   658
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   659
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   660
                b'dh/123456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   661
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   662
                b'85a16cf03ee7feba8a5abc626f1ba9886d01e89d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   663
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   664
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   665
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   666
    def testinitialspacedirlenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   667
        # initial space in directory hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   668
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   669
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   670
                b'data/ x/456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   671
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   672
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   673
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   674
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   675
                b'dh/~20x/456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   676
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   677
                b'1b3a3b712b2ac00d6af14ae8b4c14fdbf904f516'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   678
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   679
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   680
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   681
    def testinitialdotdirlenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   682
        # initial dot in directory hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   683
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   684
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   685
                b'data/.x/456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   686
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   687
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   688
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   689
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   690
                b'dh/~2ex/456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   691
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   692
                b'39dbc4c193a5643a8936fc69c3363cd7ac91ab14'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   693
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   694
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   695
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   696
    def testtrailspacedirlenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   697
        # trailing space in directory hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   698
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   699
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   700
                b'data/x /456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   701
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   702
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   703
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   704
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   705
                b'dh/x~20/456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   706
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   707
                b'2253c341df0b5290790ad312cd8499850f2273e5'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   708
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   709
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   710
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   711
    def testtrailingdotdirlenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   712
        # trailing dot in directory hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   713
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   714
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   715
                b'data/x./456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   716
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   717
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   718
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   719
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   720
                b'dh/x~2e/456789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   721
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   722
                b'cc0324d696d34562b44b5138db08ee1594ccc583'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   723
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   724
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   725
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   726
    def testdirencodinglenlimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   727
        # with directories that need direncoding, hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   728
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   729
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   730
                b'data/x.i/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   731
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   732
                b'12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   733
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   734
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   735
                b'dh/x.i.hg/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   736
                b'-xxxxxxxxx-xxxxxxxxx-xxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   737
                b'a4c4399bdf81c67dbbbb7060aa0124d8dea94f74'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   738
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   739
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   740
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   741
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   742
                b'data/x.d/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   743
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   744
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   745
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   746
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   747
                b'dh/x.d.hg/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   748
                b'-xxxxxxxxx-xxxxxxxxx-xxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   749
                b'1303fa90473b230615f5b3ea7b660e881ae5270a'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   750
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   751
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   752
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   753
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   754
                b'data/x.hg/5789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   755
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   756
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   757
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   758
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   759
                b'dh/x.hg.hg/5789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   760
                b'-xxxxxxxxx-xxxxxxxxx-xxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   761
                b'26d724a8af68e7a4e4455e6602ea9adbd0eb801f'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   762
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   763
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   764
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   765
    def testwinreservedfilenameslimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   766
        # Windows reserved filenames, hitting length limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   767
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   768
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   769
                b'data/con/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   770
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   771
                b'123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   772
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   773
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   774
                b'dh/co~6e/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   775
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   776
                b'c0794d4f4c605a2617900eb2563d7113cf6ea7d3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   777
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   778
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   779
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   780
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   781
                b'data/prn/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   782
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   783
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   784
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   785
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   786
                b'dh/pr~6e/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   787
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   788
                b'64db876e1a9730e27236cb9b167aff942240e932'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   789
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   790
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   791
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   792
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   793
                b'data/aux/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   794
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   795
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   796
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   797
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   798
                b'dh/au~78/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   799
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   800
                b'8a178558405ca6fb4bbd75446dfa186f06751a0d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   801
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   802
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   803
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   804
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   805
                b'data/nul/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   806
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   807
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   808
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   809
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   810
                b'dh/nu~6c/56789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   811
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   812
                b'c5e51b6fec1bd07bd243b053a0c3f7209855b886'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   813
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   814
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   815
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   816
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   817
                b'data/com1/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   818
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   819
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   820
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   821
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   822
                b'dh/co~6d1/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   823
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   824
                b'32f5f44ece3bb62b9327369ca84cc19c86259fcd'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   825
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   826
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   827
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   828
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   829
                b'data/com9/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   830
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   831
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   832
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   833
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   834
                b'dh/co~6d9/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   835
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   836
                b'734360b28c66a3230f55849fe8926206d229f990'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   837
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   838
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   839
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   840
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   841
                b'data/lpt1/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   842
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   843
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   844
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   845
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   846
                b'dh/lp~741/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   847
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   848
                b'e6f16ab4b6b0637676b2842b3345c9836df46ef7'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   849
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   850
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   851
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   852
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   853
                b'data/lpt9/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   854
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   855
                b'-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   856
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   857
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   858
                b'dh/lp~749/6789-123456789-123456789-123456789-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   859
                b'-xxxxxxxxx-xxxxxxxxx-xxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   860
                b'a475814c51acead3e44f2ff801f0c4903f986157'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   861
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   862
        )
17440
5be041254a2e test-hybridencode: add more testcases for hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17432
diff changeset
   863
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   864
    def testnonreservednolimit(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   865
        # non-reserved names, just not hitting limit
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   866
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   867
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   868
                b'data/123456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   869
                b'/com/com0/lpt/lpt0/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   870
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   871
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   872
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   873
                b'data/123456789-123456789-123456789-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   874
                b'/com/com0/lpt/lpt0/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   875
                b'-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   876
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   877
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   878
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   879
    def testhashedpathuntrucfirst(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   880
        # hashed path with largest untruncated 1st dir
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   881
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   882
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   883
                b'data/12345678/-123456789-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   884
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   885
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   886
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   887
                b'dh/12345678/-123456789-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   888
                b'----xxxxxxxxx-xxxxxxx4e9e9e384d00929a93b6835fbf976eb32321ff3c'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   889
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   890
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   891
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   892
    def testhashedpathsmallesttrucdir(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   893
        # hashed path with smallest truncated 1st dir
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   894
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   895
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   896
                b'data/123456789/123456789-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   897
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   898
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   899
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   900
                b'dh/12345678/123456789-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   901
                b'----xxxxxxxxx-xxxxxxxx1f4e4ec5f2be76e109bfaa8e31c062fe426d5490'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   902
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   903
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   904
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   905
    def testhashedlargesttwountruc(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   906
        # hashed path with largest untruncated two dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   907
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   908
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   909
                b'data/12345678/12345678/9-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   910
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   911
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   912
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   913
                b'dh/12345678/12345678/9-123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   914
                b'----xxxxxxxxx-xxxxxxx3332d8329d969cf835542a9f2cbcfb385b6cf39d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   915
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   916
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   917
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   918
    def testhashedpathsmallesttrunctwodirs(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   919
        # hashed path with smallest truncated two dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   920
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   921
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   922
                b'data/123456789/123456789/123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   923
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   924
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   925
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   926
                b'dh/12345678/12345678/123456789-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   927
                b'----xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   928
                b'9699559798247dffa18717138859be5f8874840e'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   929
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   930
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   931
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   932
    def testhashuntruncthree(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   933
        # hashed path with largest untruncated three dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   934
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   935
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   936
                b'data/12345678/12345678/12345678/89-123456789-123456789-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   937
                b'hashed----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   938
                b'123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   939
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   940
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   941
                b'dh/12345678/12345678/12345678/89-123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   942
                b'----xxxxxxxxx-xxxxxxxf0a2b053bb1369cce02f78c217d6a7aaea18c439'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   943
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   944
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   945
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   946
    def testhashtruncthree(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   947
        # hashed path with smallest truncated three dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   948
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   949
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   950
                b'data/123456789/123456789/123456789/123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   951
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   952
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   953
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   954
                b'dh/12345678/12345678/12345678/123456789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   955
                b'----xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   956
                b'1c6f8284967384ec13985a046d3553179d9d03cd'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   957
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   958
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   959
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   960
    def testhashuntrucfour(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   961
        # hashed path with largest untruncated four dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   962
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   963
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   964
                b'data/12345678/12345678/12345678/12345678/789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   965
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   966
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   967
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   968
                b'dh/12345678/12345678/12345678/12345678/789-123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   969
                b'----xxxxxxxxx-xxxxxxx0d30c99049d8f0ff97b94d4ef302027e8d54c6fd'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   970
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   971
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   972
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   973
    def testhashtruncfour(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   974
        # hashed path with smallest truncated four dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   975
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   976
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   977
                b'data/123456789/123456789/123456789/123456789/123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   978
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   979
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   980
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   981
                b'dh/12345678/12345678/12345678/12345678/123456789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   982
                b'----xxxxxxxxx-xxxxxxxxx-x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   983
                b'46162779e1a771810b37a737f82ae7ed33771402'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   984
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   985
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   986
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   987
    def testhashuntruncfive(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   988
        # hashed path with largest untruncated five dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
   989
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   990
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   991
                b'data/12345678/12345678/12345678/12345678/12345678/6789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   992
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   993
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   994
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   995
                b'dh/12345678/12345678/12345678/12345678/12345678/6789-hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   996
                b'----xxxxxxxxx-xxxxxxxbfe752ddc8b003c2790c66a9f2eb1ea75c114390'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   997
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
   998
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
   999
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1000
    def testhashtruncfive(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1001
        # hashed path with smallest truncated five dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1002
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1003
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1004
                b'data/123456789/123456789/123456789/123456789/123456789/hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1005
                b'----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1006
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1007
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1008
                b'dh/12345678/12345678/12345678/12345678/12345678/hashed'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1009
                b'----xxxxxxxxx-xxxxxxxxx-xx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1010
                b'b94c27b3532fa880cdd572b1c514785cab7b6ff2'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1011
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1012
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1013
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1014
    def testhashuntruncsix(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1015
        # hashed path with largest untruncated six dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1016
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1017
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1018
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1019
                b'ed----xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1020
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1021
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1022
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1023
                b'ed----xxxxxxxxx-xxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1024
                b'cd8cc5483a0f3be409e0e5d4bf9e36e113c59235'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1025
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1026
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
  1027
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1028
    def testhashtruncsix(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1029
        # hashed path with smallest truncated six dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1030
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1031
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1032
                b'data/123456789/123456789/123456789/123456789/123456789/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1033
                b'123456789/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1034
                b'123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1035
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1036
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1037
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1038
                b'xxxxxxxxx-xxxxxxxxx-xxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1039
                b'47dd6f616f833a142da00701b334cebbf640da06'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1040
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1041
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
  1042
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1043
    def testhashuntrunc7(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1044
        # hashed path with largest untruncated seven dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1045
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1046
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1047
                b'data/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1048
                b'/12345678/xxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1049
                b'123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1050
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1051
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1052
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1053
                b'/12345678/xxxxxx-xxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1054
                b'1c8ed635229fc22efe51035feeadeb4c8a0ecb82'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1055
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1056
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
  1057
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1058
    def testhashtrunc7(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1059
        # hashed path with smallest truncated seven dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1060
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1061
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1062
                b'data/123456789/123456789/123456789/123456789/123456789/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1063
                b'123456789/123456789/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1064
                b'xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1065
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1066
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1067
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/123'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1068
                b'45678/xxxxxxxxx-xxxx298ff7d33f8ce6db57930837ffea2fb2f48bb926'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1069
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1070
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
  1071
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1072
    def testhashuntrunc8(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1073
        # hashed path with largest untruncated eight dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1074
        # (directory 8 is dropped because it hits _maxshortdirslen)
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1075
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1076
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1077
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1078
                b'12345678/12345678/xxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1079
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1080
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1081
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/1'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1082
                b'2345678/xxxxxxx-xxxxxxc8996ccd41b471f768057181a4d59d2febe7277d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1083
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1084
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
  1085
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1086
    def testhashtrunc8(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1087
        # hashed path with smallest truncated eight dirs
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1088
        # (directory 8 is dropped because it hits _maxshortdirslen)
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1089
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1090
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1091
                b'data/123456789/123456789/123456789/123456789/123456789/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1092
                b'123456789/123456789/123456789/xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1093
                b'123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1094
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1095
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1096
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1097
                b'/12345678/xxxxxxxxx-xxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1098
                b'4fa04a839a6bda93e1c21c713f2edcbd16e8890d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1099
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1100
        )
17452
4aec89d4faa2 test-hybridencode: testing dir levels and dir prefix lenghts of hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17445
diff changeset
  1101
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1102
    def testhashnondropped8(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1103
        # hashed path with largest non-dropped directory 8
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1104
        # (just not hitting the _maxshortdirslen boundary)
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1105
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1106
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1107
                b'data/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1108
                b'/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1109
                b'-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1110
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1111
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1112
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1113
                b'/12345678/12345/-xxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1114
                b'4d43d1ccaa20efbfe99ec779dc063611536ff2c5'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1115
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1116
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1117
        # ...adding one truncated char to dir 1..7 won't drop dir 8
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1118
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1119
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1120
                b'data/12345678x/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1121
                b'/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1122
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1123
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1124
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/1234'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1125
                b'5678/12345/xxxxxxxx0f9efce65189cc60fd90fe4ffd49d7b58bbe0f2e'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1126
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1127
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1128
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1129
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1130
                b'data/12345678/12345678x/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1131
                b'/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1132
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1133
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1134
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/1234'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1135
                b'5678/12345/xxxxxxxx945ca395708cafdd54a94501859beabd3e243921'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1136
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1137
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1138
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1139
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1140
                b'data/12345678/12345678/12345678x/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1141
                b'345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1142
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1143
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1144
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/1234'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1145
                b'5678/12345/xxxxxxxxac62bf6898c4fd0502146074547c11caa751a327'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1146
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1147
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1148
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1149
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1150
                b'data/12345678/12345678/12345678/12345678x/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1151
                b'345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1152
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1153
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1154
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/1234'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1155
                b'5678/12345/xxxxxxxx2ae5a2baed7983fae8974d0ca06c6bf08b9aee92'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1156
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1157
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1158
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1159
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1160
                b'data/12345678/12345678/12345678/12345678/12345678x/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1161
                b'12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1162
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1163
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1164
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/1234'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1165
                b'5678/12345/xxxxxxxx214aba07b6687532a43d1e9eaf6e88cfca96b68c'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1166
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1167
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1168
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1169
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1170
                b'data/12345678/12345678/12345678/12345678/12345678/12345678x'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1171
                b'/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1172
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1173
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1174
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/1234'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1175
                b'5678/12345/xxxxxxxxe7a022ae82f0f55cf4e0498e55ba59ea4ebb55bf'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1176
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1177
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1178
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1179
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1180
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1181
                b'12345678x/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1182
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1183
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1184
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1185
                b'678/12345/xxxxxxxxb51ce61164996a80f36ce3cfe64b62d519aedae3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1186
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1187
        )
17453
97899a01d3e5 test-hybridencode: adding one truncated char to dir 1..7 won't drop dir 8
Adrian Buehlmann <adrian@cadifra.com>
parents: 17452
diff changeset
  1188
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1189
    def testhashedpathshortestdropped8(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1190
        # hashed path with shortest dropped directory 8
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1191
        # (just hitting the _maxshortdirslen boundary)
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1192
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1193
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1194
                b'data/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1195
                b'/12345678/123456/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1196
                b'123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1197
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1198
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1199
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1200
                b'/12345678/xxxxxxxxx-xxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1201
                b'11fa9873cc6c3215eae864528b5530a04efc6cfe'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1202
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1203
        )
17457
467e487f393f test-hybridencode: dropping dir eight in hashed path due to dot or space at end
Adrian Buehlmann <adrian@cadifra.com>
parents: 17453
diff changeset
  1204
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1205
    def testhashedpathdropsdir8fortrailingdotspace(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1206
        # hashed path that drops dir 8 due to dot or space at end is
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1207
        # encoded, and thus causing to hit _maxshortdirslen
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1208
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1209
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1210
                b'data/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1211
                b'/12345678/1234./-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1212
                b'123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1213
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1214
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1215
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1216
                b'/12345678/-xxxxxxxxx-xxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1217
                b'602df9b45bec564e2e1f0645d5140dddcc76ed58'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1218
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1219
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1220
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1221
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1222
                b'data/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1223
                b'/12345678/1234 /-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1224
                b'123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1225
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1226
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1227
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1228
                b'/12345678/-xxxxxxxxx-xxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1229
                b'd99ff212bc84b4d1f70cd6b0071e3ef69d4e12ce'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1230
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1231
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1232
        # ... with dir 8 short enough for encoding
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1233
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1234
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1235
                b'data/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1236
                b'/12345678/12./xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1237
                b'-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1238
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1239
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1240
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1241
                b'/12345678/12~2e/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1242
                b'xx-xxxxx7baeb5ed7f14a586ee1cacecdbcbff70032d1b3c'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1243
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1244
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1245
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1246
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1247
                b'data/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1248
                b'/12345678/12 '
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1249
                b'/xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1250
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1251
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1252
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1253
                b'/12345678/12~20/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1254
                b'xx-xxxxxcf79ca9795f77d7f75745da36807e5d772bd5182'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1255
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1256
        )
17459
f4d15f3b96c0 test-hybridencode: extensions are replicated on hashed paths
Adrian Buehlmann <adrian@cadifra.com>
parents: 17457
diff changeset
  1257
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1258
    def testextensionsreplicatedonhashedpaths(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1259
        # Extensions are replicated on hashed paths. Note that
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1260
        # we only get to encode files that end in .i or .d inside the
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1261
        # store. Encoded filenames are thus bound in length.
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1262
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1263
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1264
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1265
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1266
                b'45.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1267
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1268
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1269
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1270
                b'345678/12345/-xxxxxc10ad03b5755ed524f5286aab1815dfe07729438.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1271
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1272
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1273
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1274
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1275
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1276
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1277
                b'45.d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1278
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1279
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1280
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1281
                b'345678/12345/-xxxxx9eec83381f2b39ef5ac8b4ecdf2c94f7983f57c8.d'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1282
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1283
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1284
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1285
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1286
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1287
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1288
                b'456.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1289
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1290
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1291
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1292
                b'345678/12345/-xxxxxb7796dc7d175cfb0bb8a7728f58f6ebec9042568.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1293
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1294
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1295
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1296
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1297
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1298
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1299
                b'4567.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1300
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1301
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1302
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1303
                b'345678/12345/-xxxxxb515857a6bfeef017c4894d8df42458ac65d55b8.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1304
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1305
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1306
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1307
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1308
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1309
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1310
                b'45678.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1311
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1312
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1313
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1314
                b'345678/12345/-xxxxxb05a0f247bc0a776211cd6a32ab714fd9cc09f2b.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1315
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1316
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1317
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1318
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1319
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1320
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1321
                b'456789.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1322
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1323
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1324
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1325
                b'345678/12345/-xxxxxf192b48bff08d9e0e12035fb52bc58c70de72c94.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1326
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1327
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1328
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1329
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1330
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1331
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1332
                b'456789-.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1333
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1334
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1335
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1336
                b'345678/12345/-xxxxx435551e0ed4c7b083b9ba83cee916670e02e80ad.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1337
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1338
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1339
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1340
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1341
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1342
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1343
                b'456789-1.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1344
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1345
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1346
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1347
                b'345678/12345/-xxxxxa7f74eb98d8d58b716356dfd26e2f9aaa65d6a9a.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1348
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1349
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1350
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1351
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1352
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1353
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1354
                b'456789-12.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1355
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1356
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1357
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1358
                b'345678/12345/-xxxxxed68d9bd43b931f0b100267fee488d65a0c66f62.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1359
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1360
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1361
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1362
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1363
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1364
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1365
                b'456789-123.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1366
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1367
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1368
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1369
                b'345678/12345/-xxxxx5cea44de2b642d2ba2b4a30693ffb1049644d698.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1370
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1371
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1372
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1373
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1374
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1375
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1376
                b'456789-1234.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1377
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1378
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1379
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1380
                b'345678/12345/-xxxxx68462f62a7f230b39c1b5400d73ec35920990b7e.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1381
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1382
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1383
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1384
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1385
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1386
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1387
                b'456789-12345.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1388
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1389
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1390
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1391
                b'345678/12345/-xxxxx4cb852a314c6da240a83eec94761cdd71c6ec22e.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1392
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1393
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1394
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1395
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1396
                b'data/12345678/12345678/12345678/12345678/12345678/12345678/'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1397
                b'12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1398
                b'456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1399
                b'abcdefghjiklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPRSTUVWXYZ'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1400
                b'-1234567890-xxxxxxxxx-xxxxxxxxx-xxxxxxxx'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1401
                b'-xxxxxxxxx-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1402
                b'-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1403
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1404
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1405
                b'dh/12345678/12345678/12345678/12345678/12345678/12345678/12'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1406
                b'345678/12345/-xxxxx93352aa50377751d9e5ebdf52da1e6e69a6887a6.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1407
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1408
        )
25027
297ea0df75d0 pathencode: for long paths, strip first 5 chars, not first dir
Martin von Zweigbergk <martinvonz@google.com>
parents: 18435
diff changeset
  1409
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1410
    def testpathsoutsidedata(self):
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1411
        # paths outside data/ can be encoded
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1412
        self.hybridencode(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1413
            b'metadata/dir/00manifest.i', b'metadata/dir/00manifest.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1414
        )
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1415
        self.hybridencode(
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1416
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1417
                b'metadata/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1418
                b'/12345678/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1419
                b'/12345678/12345678/00manifest.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1420
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1421
            (
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1422
                b'dh/ata/12345678/12345678/12345678/12345678/12345678'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1423
                b'/12345678/12345678/00manife'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1424
                b'0a4da1f89aa2aa9eb0896eb451288419049781b4.i'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1425
            ),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1426
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1427
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1428
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1429
if __name__ == '__main__':
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1430
    import silenttestrunner
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 37871
diff changeset
  1431
37871
6574c81b6831 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com>
parents: 28750
diff changeset
  1432
    silenttestrunner.main(__name__)