[ https://issues.apache.org/jira/browse/AMBARI-25900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Charming Wu updated AMBARI-25900: --------------------------------- Summary: modify Function Ceil/Floor from python2 to python3 (was: modify Ceil/Floor Function from python2 to python3) > modify Function Ceil/Floor from python2 to python3 > -------------------------------------------------- > > Key: AMBARI-25900 > URL: https://issues.apache.org/jira/browse/AMBARI-25900 > Project: Ambari > Issue Type: Sub-task > Components: ambari-agent, ambari-server > Affects Versions: 2.7.5 > Environment: {*}Ambari:{*}Ambari-2.7.5 > *OS:* OpenEuler-22.03 > *Python:* Python 3.9.9 > Reporter: Charming Wu > Priority: Major > Labels: ceil, floor, python2, python3 > > 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)) > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org For additional commands, e-mail: issues-h...@ambari.apache.org