Delete dead code 50/72550/2
authorVincent Danno <vincent.danno@orange.com>
Thu, 20 May 2021 12:36:33 +0000 (14:36 +0200)
committerVincent Danno <vincent.danno@orange.com>
Thu, 20 May 2021 18:48:32 +0000 (20:48 +0200)
The piece of code became unused following change
https://gerrit.opnfv.org/gerrit/c/functest/+/39443

Signed-off-by: Vincent Danno <vincent.danno@orange.com>
Change-Id: I0bf80790c05cef217be574ad196d8c4e8dfb4c2d

xtesting/ci/tier_handler.py
xtesting/tests/unit/ci/test_tier_handler.py

index 6f78f20..86f1374 100644 (file)
@@ -16,24 +16,6 @@ import textwrap
 import prettytable
 
 
-LINE_LENGTH = 72
-
-
-def split_text(text, max_len):
-    words = text.split()
-    lines = []
-    line = ""
-    for word in words:
-        if len(line) + len(word) < max_len - 1:
-            line += word + " "
-        else:
-            lines.append(line)
-            line = word + " "
-    if line != "":
-        lines.append(line)
-    return lines
-
-
 class Tier():
 
     def __init__(self, name, description=""):
index 5ee62c4..668f33c 100644 (file)
@@ -29,11 +29,6 @@ class TierHandlerTesting(unittest.TestCase):
         self.testcase.str = self.testcase.__str__()
         self.tier.str = self.tier.__str__()
 
-    def test_split_text(self):
-        test_str = 'this is for testing'
-        self.assertEqual(tier_handler.split_text(test_str, 10),
-                         ['this is ', 'for ', 'testing '])
-
     def test_add_test(self):
         self.tier.add_test(self.test)
         self.assertEqual(self.tier.tests_array, [self.test])