summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_ptamodel.py24
-rwxr-xr-xtest/test_timingharness.py12
2 files changed, 18 insertions, 18 deletions
diff --git a/test/test_ptamodel.py b/test/test_ptamodel.py
index 7d501e6..7e398bd 100755
--- a/test/test_ptamodel.py
+++ b/test/test_ptamodel.py
@@ -9,9 +9,9 @@ import pytest
class TestModels(unittest.TestCase):
def test_model_singlefile_rf24(self):
raw_data = RawData(['test-data/20170220_164723_RF24_int_A.tar'])
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = PTAModel(by_name, parameters, arg_count, verbose=False)
+ model = PTAModel(by_name, parameters, arg_count)
self.assertEqual(model.states(), 'POWERDOWN RX STANDBY1 TX'.split(' '))
self.assertEqual(model.transitions(), 'begin epilogue powerDown powerUp setDataRate_num setPALevel_num startListening stopListening write_nb'.split(' '))
static_model = model.get_static()
@@ -78,9 +78,9 @@ class TestModels(unittest.TestCase):
def test_model_singlefile_mmparam(self):
raw_data = RawData(['test-data/20161221_123347_mmparam.tar'])
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = PTAModel(by_name, parameters, arg_count, verbose=False)
+ model = PTAModel(by_name, parameters, arg_count)
self.assertEqual(model.states(), 'OFF ON'.split(' '))
self.assertEqual(model.transitions(), 'off setBrightness'.split(' '))
static_model = model.get_static()
@@ -109,9 +109,9 @@ class TestModels(unittest.TestCase):
'test-data/20170116_131306_LM75x.tar',
]
raw_data = RawData(testfiles)
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = PTAModel(by_name, parameters, arg_count, verbose=False)
+ model = PTAModel(by_name, parameters, arg_count)
self.assertEqual(model.states(), 'ACTIVE POWEROFF'.split(' '))
self.assertEqual(model.transitions(), 'getTemp setHyst setOS shutdown start'.split(' '))
static_model = model.get_static()
@@ -139,9 +139,9 @@ class TestModels(unittest.TestCase):
'test-data/20170116_151348_sharpLS013B4DN.tar',
]
raw_data = RawData(testfiles)
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = PTAModel(by_name, parameters, arg_count, verbose=False)
+ model = PTAModel(by_name, parameters, arg_count)
self.assertEqual(model.states(), 'DISABLED ENABLED'.split(' '))
self.assertEqual(model.transitions(), 'clear disable enable ioInit sendLine toggleVCOM'.split(' '))
static_model = model.get_static()
@@ -172,9 +172,9 @@ class TestModels(unittest.TestCase):
'test-data/20170116_142654_mmstatic.tar',
]
raw_data = RawData(testfiles)
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = PTAModel(by_name, parameters, arg_count, verbose=False)
+ model = PTAModel(by_name, parameters, arg_count)
self.assertEqual(model.states(), 'B G OFF R'.split(' '))
self.assertEqual(model.transitions(), 'blue green off red'.split(' '))
static_model = model.get_static()
@@ -206,9 +206,9 @@ class TestModels(unittest.TestCase):
'test-data/20170125_154019_cc1200.tar',
]
raw_data = RawData(testfiles)
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = PTAModel(by_name, parameters, arg_count, verbose=False)
+ model = PTAModel(by_name, parameters, arg_count)
self.assertEqual(model.states(), 'IDLE RX SLEEP SLEEP_EWOR SYNTH_ON TX XOFF'.split(' '))
self.assertEqual(model.transitions(), 'crystal_off eWOR idle init prepare_xmit receive send setSymbolRate setTxPower sleep txDone'.split(' '))
static_model = model.get_static()
diff --git a/test/test_timingharness.py b/test/test_timingharness.py
index c8a422c..9c49b46 100755
--- a/test/test_timingharness.py
+++ b/test/test_timingharness.py
@@ -8,9 +8,9 @@ import unittest
class TestModels(unittest.TestCase):
def test_model_singlefile_rf24(self):
raw_data = TimingData(['test-data/20190815_111745_nRF24_no-rx.json'])
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = AnalyticModel(by_name, parameters, arg_count, verbose=False)
+ model = AnalyticModel(by_name, parameters, arg_count)
self.assertEqual(model.names, 'setPALevel setRetries setup write'.split(' '))
static_model = model.get_static()
self.assertAlmostEqual(static_model('setPALevel', 'duration'), 146, places=0)
@@ -34,10 +34,10 @@ class TestModels(unittest.TestCase):
def test_dependent_parameter_pruning(self):
raw_data = TimingData(['test-data/20190815_103347_nRF24_no-rx.json'])
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
prune_dependent_parameters(by_name, parameters)
- model = AnalyticModel(by_name, parameters, arg_count, verbose=False)
+ model = AnalyticModel(by_name, parameters, arg_count)
self.assertEqual(model.names, 'getObserveTx setPALevel setRetries setup write'.split(' '))
static_model = model.get_static()
self.assertAlmostEqual(static_model('getObserveTx', 'duration'), 75, places=0)
@@ -63,9 +63,9 @@ class TestModels(unittest.TestCase):
def test_function_override(self):
raw_data = TimingData(['test-data/20190815_122531_nRF24_no-rx.json'])
- preprocessed_data = raw_data.get_preprocessed_data(verbose=False)
+ preprocessed_data = raw_data.get_preprocessed_data()
by_name, parameters, arg_count = pta_trace_to_aggregate(preprocessed_data)
- model = AnalyticModel(by_name, parameters, arg_count, verbose=False, function_override={('write', 'duration'): '(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))'})
+ model = AnalyticModel(by_name, parameters, arg_count, function_override={('write', 'duration'): '(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.assertEqual(model.names, 'setAutoAck setPALevel setRetries setup write'.split(' '))
static_model = model.get_static()
self.assertAlmostEqual(static_model('setAutoAck', 'duration'), 72, places=0)