コード例 #1
0
ファイル: test_parser.py プロジェクト: pdef/pdef
    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'
コード例 #2
0
ファイル: test_parser.py プロジェクト: pdef/pdef
    def test_multiline_indented_text(self):
        s = cleanup_docstring('''/**
         * yaml:
         *   key0: value0
         *   key1: value1
         */''')

        assert s == 'yaml:\n  key0: value0\n  key1: value1'
コード例 #3
0
ファイル: test_parser.py プロジェクト: pdef/pdef
 def test_multiline(self):
     s = cleanup_docstring('''/**
      * hello,
      * world
      */ ''')
     assert s == 'hello,\nworld'