Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.7.5
-
None
-
Ambari:Ambari-2.7.5
OS: OpenEuler-22.03
Python: Python 3.9.9
Description
In pytthon2, ceil()/floor() function work as follows:
ceil(1.2) => 2.0
floor(1.2) => 1.0
In python3, ceil() function work as follows:
ceil(1.2) => 2
floor(1.2) => 1
which means that in python2 it return a float value, in python3 it return a Integer, this feature will casue Unit Test failed.
To avoid failed unit test, I would like to make this change:
python2 : a = ceil(b)
python3 : a = float(ceil(b))