summaryrefslogtreecommitdiff
path: root/test/test_timingharness.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-02-26 16:02:19 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2021-02-26 16:02:19 +0100
commit32bcad3482781e7e2e42c5de10d938c1567b8390 (patch)
tree3bbb58740d04c789f549de50dce1f0cc2a45480d /test/test_timingharness.py
parent21698b9915f02216a1afa5afb36b56f65f30b8ca (diff)
refactor param_info, show splits in analyze-archive output
Diffstat (limited to 'test/test_timingharness.py')
-rwxr-xr-xtest/test_timingharness.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/test_timingharness.py b/test/test_timingharness.py
index 9b55231..5cc0bec 100755
--- a/test/test_timingharness.py
+++ b/test/test_timingharness.py
@@ -34,21 +34,21 @@ class TestModels(unittest.TestCase):
self.assertEqual(param_info("setRetries", "duration"), None)
self.assertEqual(param_info("setup", "duration"), None)
self.assertEqual(
- param_info("write", "duration")["function"].model_function,
+ param_info("write", "duration").function.model_function,
"0 + regression_arg(0) + regression_arg(1) * parameter(max_retry_count) + regression_arg(2) * parameter(retry_delay) + regression_arg(3) * parameter(max_retry_count) * parameter(retry_delay)",
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[0], 1163, places=0
+ param_info("write", "duration").function.model_args[0], 1163, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[1], 464, places=0
+ param_info("write", "duration").function.model_args[1], 464, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[2], 1, places=0
+ param_info("write", "duration").function.model_args[2], 1, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[3], 1, places=0
+ param_info("write", "duration").function.model_args[3], 1, places=0
)
def test_dependent_parameter_pruning(self):
@@ -82,21 +82,21 @@ class TestModels(unittest.TestCase):
self.assertEqual(param_info("setRetries", "duration"), None)
self.assertEqual(param_info("setup", "duration"), None)
self.assertEqual(
- param_info("write", "duration")["function"].model_function,
+ param_info("write", "duration").function.model_function,
"0 + regression_arg(0) + regression_arg(1) * parameter(max_retry_count) + regression_arg(2) * parameter(retry_delay) + regression_arg(3) * parameter(max_retry_count) * parameter(retry_delay)",
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[0], 1163, places=0
+ param_info("write", "duration").function.model_args[0], 1163, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[1], 464, places=0
+ param_info("write", "duration").function.model_args[1], 464, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[2], 1, places=0
+ param_info("write", "duration").function.model_args[2], 1, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[3], 1, places=0
+ param_info("write", "duration").function.model_args[3], 1, places=0
)
def test_function_override(self):
@@ -140,24 +140,24 @@ class TestModels(unittest.TestCase):
self.assertEqual(param_info("setRetries", "duration"), None)
self.assertEqual(param_info("setup", "duration"), None)
self.assertEqual(
- param_info("write", "duration")["function"].model_function,
+ param_info("write", "duration").function.model_function,
"(parameter(auto_ack!) * (regression_arg(0) + regression_arg(1) * parameter(max_retry_count) + regression_arg(2) * parameter(retry_delay) + regression_arg(3) * parameter(max_retry_count) * parameter(retry_delay))) + ((1 - parameter(auto_ack!)) * regression_arg(4))",
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[0], 1162, places=0
+ param_info("write", "duration").function.model_args[0], 1162, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[1], 464, places=0
+ param_info("write", "duration").function.model_args[1], 464, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[2], 1, places=0
+ param_info("write", "duration").function.model_args[2], 1, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[3], 1, places=0
+ param_info("write", "duration").function.model_args[3], 1, places=0
)
self.assertAlmostEqual(
- param_info("write", "duration")["function"].model_args[4], 1086, places=0
+ param_info("write", "duration").function.model_args[4], 1086, places=0
)
os.environ.pop("DFATOOL_NO_DECISIONTREES")