Exemplo n.º 1
0
    def test010_test_output(self):
        '''reverse_string: testing output of function is a string

        Your reverse_string function not returning a string

        '''
        self.assertEqual(type(lab5.reverse_string('asdf')), str)
Exemplo n.º 2
0
    def test010_test_output(self):
        '''reverse_string: testing output of function is a string

        Your reverse_string function not returning a string

        '''
        self.assertEqual(type(lab5.reverse_string('asdf')), str)
Exemplo n.º 3
0
    def test015_test_output(self):
        '''reverse_string: testing output of function is correct

        Your reverse_string function should return 'olleh' for the
        argument: 'hello'

        '''
        self.assertEqual(lab5.reverse_string('hello'), 'olleh')
Exemplo n.º 4
0
    def test015_test_output(self):
        '''reverse_string: testing output of function is correct

        Your reverse_string function should return 'olleh' for the
        argument: 'hello'

        '''
        self.assertEqual(lab5.reverse_string('hello'), 'olleh')
Exemplo n.º 5
0
    def test020_test_output(self):
        '''reverse_string: testing output of function is correct

        Your reverse_string function is not returning the correct
        output

        '''
        for a0 in ['aaaa', 'asdf', 'abcdabcd']:
            self.assertEqual(lab5.reverse_string(a0), ''.join(reversed(a0)))
Exemplo n.º 6
0
    def test020_test_output(self):
        '''reverse_string: testing output of function is correct

        Your reverse_string function is not returning the correct
        output

        '''
        for a0 in ['aaaa','asdf','abcdabcd']:
            self.assertEqual(
                lab5.reverse_string(a0),''.join(reversed(a0))
            )