summaryrefslogtreecommitdiffstats
path: root/tests/utilities_tests/data_treatment_test.py
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-07-11 15:12:35 -0400
committermbeierl <mark.beierl@dell.com>2017-07-11 15:47:46 -0400
commit7602a54309adbe5c5346ee6befecc2e596976504 (patch)
tree60f15026780db30b0b8842ba1a1e2cc021e22625 /tests/utilities_tests/data_treatment_test.py
parentfc09b37e95c19f820ec60db19d98c0dc3d670829 (diff)
Change all paths
Changes the paths of all source code so that it exists under the dockerfile location for each container. This way we can use COPY instead of git clone, as well as use the existing JJB. Change-Id: I883b2957d89659c164fff0a1ebc4d677c534796d JIRA: STORPERF-188 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'tests/utilities_tests/data_treatment_test.py')
-rw-r--r--tests/utilities_tests/data_treatment_test.py81
1 files changed, 0 insertions, 81 deletions
diff --git a/tests/utilities_tests/data_treatment_test.py b/tests/utilities_tests/data_treatment_test.py
deleted file mode 100644
index 4450f92..0000000
--- a/tests/utilities_tests/data_treatment_test.py
+++ /dev/null
@@ -1,81 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 CENGN and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-import unittest
-from storperf.utilities import data_treatment as DataTreatment
-
-
-class DataTreatmentTest(unittest.TestCase):
-
- def setUp(self):
- unittest.TestCase.setUp(self)
-
- def test_empty_series(self):
- expected = {
- 'slope_data': [],
- 'range_data': [],
- 'average_data': []
- }
- data_series = []
- actual = DataTreatment.data_treatment(data_series)
- self.assertEqual(expected, actual)
-
- def test_integer_series(self):
- expected = {
- 'slope_data': [[1, 5], [66, 2], [12, 98], [74, 669], [33, 66]],
- 'range_data': [5, 2, 98, 669, 66],
- 'average_data': [5, 2, 98, 669, 66]
- }
- data_series = [[1, 5], [66, 2], [12, 98], [74, 669], [33, 66]]
- actual = DataTreatment.data_treatment(data_series)
- self.assertEqual(expected, actual)
-
- def test_float_series(self):
- expected = {
- 'slope_data': [[5.6, 12.7], [96.66, 78.212],
- [639.568, 5.3], [4.65, 6.667]],
- 'range_data': [12.7, 78.212, 5.3, 6.667],
- 'average_data': [12.7, 78.212, 5.3, 6.667]
- }
- data_series = [
- [5.6, 12.7], [96.66, 78.212], [639.568, 5.3], [4.65, 6.667]]
- actual = DataTreatment.data_treatment(data_series)
- self.assertEqual(expected, actual)
-
- def test_float_int_mix(self):
- expected = {
- 'slope_data': [[5, 12.7], [96.66, 7], [639.568, 5.3], [4, 6]],
- 'range_data': [12.7, 7, 5.3, 6],
- 'average_data': [12.7, 7, 5.3, 6]
- }
- data_series = [[5, 12.7], [96.66, 7], [639.568, 5.3], [4, 6]]
- actual = DataTreatment.data_treatment(data_series)
- self.assertEqual(expected, actual)
-
- def test_negative_values(self):
- expected = {
- 'slope_data': [[-15, 5.56], [41.3, -278], [41.3, -98],
- [78.336, -0.12], [33.667, 66]],
- 'range_data': [5.56, -278, -98, -0.12, 66],
- 'average_data': [5.56, -278, -98, -0.12, 66]
- }
- data_series = [
- [-15, 5.56], [41.3, -278], [41.3, -98],
- [78.336, -0.12], [33.667, 66]]
- actual = DataTreatment.data_treatment(data_series)
- self.assertEqual(expected, actual)
-
- def test_single_value(self):
- expected = {
- 'slope_data': [[86.8, 65.36]],
- 'range_data': [65.36],
- 'average_data': [65.36]
- }
- data_series = [[86.8, 65.36]]
- actual = DataTreatment.data_treatment(data_series)
- self.assertEqual(expected, actual)