]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
the use of std::to_string change the double presentation(not accuracy)
authorgalsalomon66 <gal.salomon@gmail.com>
Sun, 18 Sep 2022 07:46:04 +0000 (10:46 +0300)
committerCasey Bodley <cbodley@redhat.com>
Wed, 19 Oct 2022 19:46:02 +0000 (15:46 -0400)
Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
(cherry picked from commit b20001356520256db522f9b7c4f392dbc085a4dd)

s3tests_boto3/functional/test_s3select.py

index 7b410d3adad4e1e6b82310e0ea9fbf0b29cc7a65..bec1b481a40267a032a4d6cc28d94a51d788eeaf 100644 (file)
@@ -72,10 +72,10 @@ def generate_s3select_expression_projection(bucket_name,obj_name):
         res = remove_xml_tags_from_result( run_s3select(bucket_name,obj_name,"select " + e + " from s3object;",) ).replace(",","")
 
         # accuracy level 
-        epsilon = float(0.000001) 
+        epsilon = float(0.00001) 
 
         # both results should be close (epsilon)
-        assert (1 - (float(res.split("\n")[1]) / eval( e )) ) < epsilon
+        assert(  abs(float(res.split("\n")[1]) - eval(e)) < epsilon )
 
 @attr('s3select')
 def get_random_string():