~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/util/_bencode_py.py

  • Committer: John Arbash Meinel
  • Date: 2009-09-24 19:26:45 UTC
  • mto: (4634.52.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 4716.
  • Revision ID: john@arbash-meinel.com-20090924192645-hyy1ycnnk6u3j5j6
Catch a corner case that we were missing.
The CHKInventory tests were passing, but failed for test_inv because
we were passing None to _getitems(). That only failed for InternalNodes,
but we were using a structure that didn't have internal nodes.
So now the test is parameterized on a small CHKInventory page size
to force those things out into the open.

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
        encode_int(int(x), r)
155
155
    encode_func[BooleanType] = encode_bool
156
156
 
157
 
from bzrlib._static_tuple_py import StaticTuple
158
 
encode_func[StaticTuple] = encode_list
159
 
try:
160
 
    from bzrlib._static_tuple_c import StaticTuple
161
 
except ImportError:
162
 
    pass
163
 
else:
164
 
    encode_func[StaticTuple] = encode_list
165
 
 
166
157
 
167
158
def bencode(x):
168
159
    r = []