Kaydet (Commit) f359410c authored tarafından Guido van Rossum's avatar Guido van Rossum

Use floor division (//).

üst e46d1559
...@@ -232,7 +232,7 @@ class CompressObjectTestCase(unittest.TestCase): ...@@ -232,7 +232,7 @@ class CompressObjectTestCase(unittest.TestCase):
bufs = [] bufs = []
cb = combuf cb = combuf
while cb: while cb:
#max_length = 1 + len(cb)/10 #max_length = 1 + len(cb)//10
chunk = dco.decompress(cb, dcx) chunk = dco.decompress(cb, dcx)
self.failIf(len(chunk) > dcx, self.failIf(len(chunk) > dcx,
'chunk too big (%d>%d)' % (len(chunk), dcx)) 'chunk too big (%d>%d)' % (len(chunk), dcx))
...@@ -268,7 +268,7 @@ class CompressObjectTestCase(unittest.TestCase): ...@@ -268,7 +268,7 @@ class CompressObjectTestCase(unittest.TestCase):
bufs = [] bufs = []
cb = combuf cb = combuf
while cb: while cb:
max_length = 1 + len(cb)/10 max_length = 1 + len(cb)//10
chunk = dco.decompress(cb, max_length) chunk = dco.decompress(cb, max_length)
self.failIf(len(chunk) > max_length, self.failIf(len(chunk) > max_length,
'chunk too big (%d>%d)' % (len(chunk),max_length)) 'chunk too big (%d>%d)' % (len(chunk),max_length))
...@@ -295,7 +295,7 @@ class CompressObjectTestCase(unittest.TestCase): ...@@ -295,7 +295,7 @@ class CompressObjectTestCase(unittest.TestCase):
bufs = [] bufs = []
cb = combuf cb = combuf
while cb: while cb:
max_length = 1 + len(cb)/10 max_length = 1 + len(cb)//10
chunk = dco.decompress(cb, max_length) chunk = dco.decompress(cb, max_length)
self.failIf(len(chunk) > max_length, self.failIf(len(chunk) > max_length,
'chunk too big (%d>%d)' % (len(chunk),max_length)) 'chunk too big (%d>%d)' % (len(chunk),max_length))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment