13306: Changes to arvados-cwl-runner code after running futurize --stage2
[arvados.git] / sdk / cwl / tests / wf / check_mem.py
index bad16ed06bcfd0c4661309834f3e26ec80cb3084..88eb2fd513c19a8359571d6aab3ac6777be95ff6 100644 (file)
@@ -3,6 +3,8 @@
 # SPDX-License-Identifier: Apache-2.0
 
 from __future__ import print_function
+from __future__ import division
+from past.utils import old_div
 import arvados
 import sys
 import os
@@ -10,7 +12,7 @@ import os
 if "JOB_UUID" in os.environ:
     requested = arvados.api().jobs().get(uuid=os.environ["JOB_UUID"]).execute()["runtime_constraints"]["min_ram_mb_per_node"]
 else:
-    requested = arvados.api().containers().current().execute()["runtime_constraints"]["ram"]/(1024*1024)
+    requested = old_div(arvados.api().containers().current().execute()["runtime_constraints"]["ram"],(1024*1024))
 
 print("Requested %d expected %d" % (requested, int(sys.argv[1])))