예제 #1
0
class RotateStringTestCase(unittest.TestCase):
    def setUp(self):
        self.obj = RotateString()

    def tearDown(self):
        del self.obj

    # empty string
    def test_rotate_string(self):
        self.assertEqual(self.obj.rotate_string(list(''), 10), [])

    # out of string length
    def test_rotate_string(self):
        self.assertEqual(self.obj.rotate_string(list('timelimiterror'), 1000000000), list('terrortimelimi'))
예제 #2
0
class RotateStringTestCase(unittest.TestCase):
    def setUp(self):
        self.obj = RotateString()

    def tearDown(self):
        del self.obj

    # empty string
    def test_rotate_string(self):
        self.assertEqual(self.obj.rotate_string(list(''), 10), [])

    # out of string length
    def test_rotate_string(self):
        self.assertEqual(
            self.obj.rotate_string(list('timelimiterror'), 1000000000),
            list('terrortimelimi'))
예제 #3
0
 def setUp(self):
     self.obj = RotateString()
예제 #4
0
 def setUp(self):
     self.obj = RotateString()