Пример #1
0
    def test_modify_in_place(self):
        lines = ["Summary line.", "", "Args:", "   arg1: arg1 description"]
        app = mock.Mock()
        app.config = Config()
        _process_docstring(app, "class", "SampleClass", SampleClass, mock.Mock(), lines)

        expected = ["Summary line.", "", ":param arg1: arg1 description", ""]
        self.assertEqual(expected, lines)
Пример #2
0
    def test_modify_in_place(self):
        lines = ['Summary line.', '', 'Args:', '   arg1: arg1 description']
        app = mock.Mock()
        app.config = Config()
        _process_docstring(app, 'class', 'SampleClass', SampleClass,
                           mock.Mock(), lines)

        expected = ['Summary line.', '', ':param arg1: arg1 description', '']
        self.assertEqual(expected, lines)
Пример #3
0
    def test_modify_in_place(self):
        lines = ['Summary line.',
                 '',
                 'Args:',
                 '   arg1: arg1 description']
        app = mock.Mock()
        app.config = Config()
        _process_docstring(app, 'class', 'SampleClass', SampleClass,
                           mock.Mock(), lines)

        expected = ['Summary line.',
                    '',
                    ':param arg1: arg1 description',
                    '']
        self.assertEqual(expected, lines)