From 3138795899fc3eb884fc6f61f77e285ac2f4e82f Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Sat, 21 Mar 2015 02:55:30 -0700 Subject: [PATCH] Fix rate limiter testbenches --- tb/test_axis_rate_limit.py | 4 ++-- tb/test_axis_rate_limit_64.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tb/test_axis_rate_limit.py b/tb/test_axis_rate_limit.py index b9f0ff420..8cdbf84cb 100755 --- a/tb/test_axis_rate_limit.py +++ b/tb/test_axis_rate_limit.py @@ -505,8 +505,8 @@ def bench(): assert byte_count == sum(len(f.data) for f in test_frame) assert frame_count == len(test_frame) - test_rate = 1.0 * rate_num / rate_denom - meas_rate = 1.0 * byte_count / tick_count + test_rate = float(rate_num) / float(rate_denom) + meas_rate = float(byte_count) / float(tick_count) error = (test_rate - meas_rate) / test_rate print("test rate %f" % test_rate) diff --git a/tb/test_axis_rate_limit_64.py b/tb/test_axis_rate_limit_64.py index acfc3c7a1..d2f3e872f 100755 --- a/tb/test_axis_rate_limit_64.py +++ b/tb/test_axis_rate_limit_64.py @@ -515,8 +515,8 @@ def bench(): assert byte_count == sum(len(f.data) for f in test_frame) assert frame_count == len(test_frame) - test_rate = 1.0 * rate_num / rate_denom - meas_rate = 1.0 * byte_count / tick_count + test_rate = float(rate_num) / float(rate_denom) + meas_rate = float(byte_count) / float(tick_count) error = (test_rate - meas_rate) / test_rate print("test rate %f" % test_rate)