D5759: tests: cast division result to int

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Jan 30 21:37:43 UTC 2019


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Otherwise it is a float on Python 3 and code later compares about
  casting a float to an int.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5759

AFFECTED FILES
  tests/test-remotefilelog-datapack.py

CHANGE DETAILS

diff --git a/tests/test-remotefilelog-datapack.py b/tests/test-remotefilelog-datapack.py
--- a/tests/test-remotefilelog-datapack.py
+++ b/tests/test-remotefilelog-datapack.py
@@ -291,7 +291,7 @@
 
         class testdatapackstore(datapack.datapackstore):
             # Ensures that we are not keeping everything in the cache.
-            DEFAULTCACHESIZE = numpacks / 2
+            DEFAULTCACHESIZE = int(numpacks / 2)
 
         store = testdatapackstore(uimod.ui(), packdir)
 



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list