-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1beb550
commit 52013e2
Showing
30 changed files
with
1,262 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from piel.experimental.types import ( | ||
ExperimentData, | ||
ExperimentDataCollection, | ||
Experiment, | ||
PropagationDelayMeasurementDataCollection, | ||
) | ||
from piel.types import Instance | ||
|
||
|
||
# Test ExperimentData | ||
def test_experiment_data_initialization(): | ||
experiment = Experiment(name="Test Experiment") | ||
measurement_data = ( | ||
PropagationDelayMeasurementDataCollection() | ||
) # Use appropriate mock or actual type | ||
|
||
experiment_data = ExperimentData(experiment=experiment, data=measurement_data) | ||
|
||
assert isinstance(experiment_data, Instance) | ||
assert experiment_data.experiment == experiment | ||
assert experiment_data.data == measurement_data | ||
|
||
|
||
def test_experiment_data_default_initialization(): | ||
experiment_data = ExperimentData() | ||
|
||
assert isinstance(experiment_data, Instance) | ||
assert experiment_data.experiment is None | ||
assert experiment_data.data is None | ||
|
||
|
||
# Test ExperimentDataCollection | ||
def test_experiment_data_collection_initialization(): | ||
experiment_data_1 = ExperimentData() | ||
experiment_data_2 = ExperimentData() | ||
|
||
data_collection = ExperimentDataCollection( | ||
collection=[experiment_data_1, experiment_data_2] | ||
) | ||
|
||
assert isinstance(data_collection, Instance) | ||
assert data_collection.collection == [experiment_data_1, experiment_data_2] | ||
|
||
|
||
def test_experiment_data_collection_default_initialization(): | ||
data_collection = ExperimentDataCollection() | ||
|
||
assert isinstance(data_collection, Instance) | ||
assert data_collection.collection == [] | ||
|
||
|
||
# Add more tests as needed for validators, edge cases, and behaviors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
from piel.experimental.types import ( | ||
VNASParameterMeasurementData, | ||
VNASParameterMeasurementDataCollection, | ||
VNAPowerSweepMeasurementData, | ||
MeasurementData, | ||
MeasurementDataCollection, | ||
) | ||
|
||
|
||
# Test VNASParameterMeasurementData | ||
def test_vna_sparameter_measurement_data_initialization(): | ||
measurement_data = VNASParameterMeasurementData() | ||
|
||
assert isinstance(measurement_data, MeasurementData) | ||
assert measurement_data.type == "VNASParameterMeasurementData" | ||
assert measurement_data.network is None | ||
|
||
|
||
def test_vna_sparameter_measurement_data_default_initialization(): | ||
measurement_data = VNASParameterMeasurementData() | ||
|
||
assert isinstance(measurement_data, MeasurementData) | ||
assert measurement_data.type == "VNASParameterMeasurementData" | ||
assert measurement_data.network is None | ||
|
||
|
||
# Test VNAPowerSweepMeasurementData | ||
def test_vna_power_sweep_measurement_data_initialization(): | ||
network = None | ||
measurement_data = VNAPowerSweepMeasurementData(network=network) | ||
|
||
assert isinstance(measurement_data, MeasurementData) | ||
assert measurement_data.type == "VNAPowerSweepMeasurementData" | ||
assert measurement_data.network is None | ||
|
||
|
||
def test_vna_power_sweep_measurement_data_default_initialization(): | ||
measurement_data = VNAPowerSweepMeasurementData() | ||
|
||
assert isinstance(measurement_data, MeasurementData) | ||
assert measurement_data.type == "VNAPowerSweepMeasurementData" | ||
assert measurement_data.network is None | ||
|
||
|
||
# Test VNASParameterMeasurementDataCollection | ||
def test_vna_sparameter_measurement_data_collection_initialization(): | ||
measurement_data_1 = VNASParameterMeasurementData() | ||
measurement_data_2 = VNASParameterMeasurementData() | ||
|
||
data_collection = VNASParameterMeasurementDataCollection( | ||
collection=[measurement_data_1, measurement_data_2] | ||
) | ||
|
||
assert isinstance(data_collection, MeasurementDataCollection) | ||
assert data_collection.type == "VNASParameterMeasurementDataCollection" | ||
assert data_collection.collection == [measurement_data_1, measurement_data_2] | ||
|
||
|
||
def test_vna_sparameter_measurement_data_collection_default_initialization(): | ||
data_collection = VNASParameterMeasurementDataCollection() | ||
|
||
assert isinstance(data_collection, MeasurementDataCollection) | ||
assert data_collection.type == "VNASParameterMeasurementDataCollection" | ||
assert data_collection.collection == [] | ||
|
||
|
||
# Test FrequencyMeasurementDataCollection with mixed types | ||
def test_frequency_measurement_data_collection_initialization(): | ||
sparam_data = VNASParameterMeasurementData() | ||
power_sweep_data = VNAPowerSweepMeasurementData() | ||
|
||
data_collection = VNASParameterMeasurementDataCollection() | ||
|
||
assert isinstance(data_collection, MeasurementDataCollection) | ||
assert data_collection.type == "VNASParameterMeasurementDataCollection" | ||
assert data_collection.collection == [] | ||
|
||
|
||
def test_frequency_measurement_data_collection_default_initialization(): | ||
data_collection = VNASParameterMeasurementDataCollection() | ||
|
||
assert isinstance(data_collection, MeasurementDataCollection) | ||
assert data_collection.type == "VNASParameterMeasurementDataCollection" | ||
assert data_collection.collection == [] | ||
|
||
|
||
# Add more tests as needed for additional methods, edge cases, and behaviors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from piel.experimental.types import ( | ||
PropagationDelayMeasurementData, | ||
PropagationDelayMeasurementDataCollection, | ||
MeasurementData, | ||
MeasurementDataCollection, | ||
) | ||
from piel.types import ( | ||
DataTimeSignalData, | ||
SignalMetricsMeasurementCollection, | ||
) | ||
|
||
|
||
# Test PropagationDelayMeasurementData | ||
def test_propagation_delay_measurement_data_initialization(): | ||
signal_metrics = SignalMetricsMeasurementCollection() | ||
dut_waveform = DataTimeSignalData() | ||
reference_waveform = DataTimeSignalData() | ||
|
||
measurement_data = PropagationDelayMeasurementData( | ||
measurements=signal_metrics, | ||
dut_waveform=dut_waveform, | ||
reference_waveform=reference_waveform, | ||
) | ||
|
||
assert isinstance(measurement_data, MeasurementData) | ||
assert measurement_data.type == "PropagationDelayMeasurementData" | ||
assert measurement_data.measurements == signal_metrics | ||
assert measurement_data.dut_waveform == dut_waveform | ||
assert measurement_data.reference_waveform == reference_waveform | ||
|
||
|
||
def test_propagation_delay_measurement_data_default_initialization(): | ||
measurement_data = PropagationDelayMeasurementData() | ||
|
||
assert isinstance(measurement_data, MeasurementData) | ||
assert measurement_data.type == "PropagationDelayMeasurementData" | ||
assert measurement_data.measurements is None | ||
assert measurement_data.dut_waveform is None | ||
assert measurement_data.reference_waveform is None | ||
|
||
|
||
# Test PropagationDelayMeasurementDataCollection | ||
def test_propagation_delay_measurement_data_collection_initialization(): | ||
data_1 = PropagationDelayMeasurementData() | ||
data_2 = PropagationDelayMeasurementData() | ||
|
||
data_collection = PropagationDelayMeasurementDataCollection( | ||
collection=[data_1, data_2] | ||
) | ||
|
||
assert isinstance(data_collection, MeasurementDataCollection) | ||
assert data_collection.type == "PropagationDelayMeasurementDataCollection" | ||
assert data_collection.collection == [data_1, data_2] | ||
|
||
|
||
def test_propagation_delay_measurement_data_collection_default_initialization(): | ||
data_collection = PropagationDelayMeasurementDataCollection() | ||
|
||
assert isinstance(data_collection, MeasurementDataCollection) | ||
assert data_collection.type == "PropagationDelayMeasurementDataCollection" | ||
assert data_collection.collection == [] | ||
|
||
|
||
# Add more tests as needed for additional methods, edge cases, and behaviors. |
Oops, something went wrong.