diff options
Diffstat (limited to 'lab_control/test/measurement_test.py')
-rw-r--r-- | lab_control/test/measurement_test.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/lab_control/test/measurement_test.py b/lab_control/test/measurement_test.py deleted file mode 100644 index 07716a3..0000000 --- a/lab_control/test/measurement_test.py +++ /dev/null @@ -1,53 +0,0 @@ -import pytest - -from lab_control.measurement import * - -@pytest.fixture -def uut(): - return Measurement() - -def test_linearRangeAscending(): - first = 100.0 - last = 200.0 - steps = 11 - - expectedRange = [ - 100.0, 110.0, 120.0, 130.0, - 140.0, 150.0, 160.0, 170.0, - 180.0, 190.0, 200.0 - ] - - actualRange = getLinearRange(first, last, steps) - assert actualRange == expectedRange - -def test_linearRangeDescending(): - first = 200.0 - last = 180.0 - steps = 3 - - expectedRange = [ - 200.0, 190.0, 180.0 - ] - - actualRange = getLinearRange(first, last, steps) - assert actualRange == expectedRange - -def test_linearRangeTwoSteps(): - first = 20.0 - last = -20.0 - steps = 2 - - expectedRange = [ - 20.0, -20.0 - ] - - actualRange = getLinearRange(first, last, steps) - assert actualRange == expectedRange - -def test_linearRangeOneStep(): - first = 20.0 - last = -20.0 - steps = 1 - - with pytest.raises(AssertionError): - actualRange = getLinearRange(first, last, steps) |