Ejemplo n.º 1
0
    def test_oneline(self):
        s = cleanup_docstring('hello, world')
        assert s == 'hello, world'

        s = cleanup_docstring('/** hello, world */')
        assert s == 'hello, world'

        s = cleanup_docstring(' /**   hello, world    */  ')
        assert s == 'hello, world'
Ejemplo n.º 2
0
    def test_multiline_indented_text(self):
        s = cleanup_docstring('''/**
         * yaml:
         *   key0: value0
         *   key1: value1
         */''')

        assert s == 'yaml:\n  key0: value0\n  key1: value1'
Ejemplo n.º 3
0
 def test_multiline(self):
     s = cleanup_docstring('''/**
      * hello,
      * world
      */ ''')
     assert s == 'hello,\nworld'