コード例 #1
0
ファイル: arguments.py プロジェクト: Metastasis/torcheck
 def _split_lines(self, text, width):
     if text.startswith('R|'):
         raw_text = text[2:]
         if "<br>" in raw_text:
             return raw_text.split('<br>')
         return HelpFormatter._split_lines(self, raw_text, width)
         # this is the RawTextHelpFormatter._split_lines
     return HelpFormatter._split_lines(self, text, width)
コード例 #2
0
 def test_normal(self):
     formatter = shell.SmartFormatter(None)
     raw_string = 'This is a raw string that will be split over lines '\
         'because it will go into the HelpFormatter.  but This string '\
         'needs to be longer'\
         'than 80 chars to split on the lines'
     value = formatter._split_lines(raw_string, self.width)
     self.assertEqual(
         value, HelpFormatter._split_lines(formatter, raw_string,
                                           self.width))
コード例 #3
0
ファイル: test_unit.py プロジェクト: wiggzz/downstream-farmer
 def test_normal(self):
     formatter = shell.SmartFormatter(None)
     raw_string = 'This is a raw string that will be split over lines '\
         'because it will go into the HelpFormatter.  but This string '\
         'needs to be longer'\
         'than 80 chars to split on the lines'
     value = formatter._split_lines(raw_string, self.width)
     self.assertEqual(
         value, HelpFormatter._split_lines(formatter,
                                           raw_string,
                                           self.width))
コード例 #4
0
 def _split_lines(self, text, width):
     if text.startswith('R|'):
         return text[2:].splitlines()
     # this is the RawTextHelpFormatter._split_lines
     return HelpFormatter._split_lines(self, text, width)
コード例 #5
0
ファイル: manage.py プロジェクト: zetaops/pyoko
 def _split_lines(self, text, width):
     # this is the RawTextHelpFormatter._split_lines
     if text.startswith('R|'):
         return text[2:].splitlines()
     return HelpFormatter._split_lines(self, text, width)
コード例 #6
0
 def _split_lines(self, text, width):
     print(text)
     if text.startswith('CF|'):
         return text[3:].splitlines()
     return HelpFormatter._split_lines(self, text, width)
コード例 #7
0
ファイル: cli.py プロジェクト: tanglu-org/laniakea
 def _split_lines(self, text, width):
     print(text)
     if text.startswith('CF|'):
         return text[3:].splitlines()
     return HelpFormatter._split_lines(self, text, width)
コード例 #8
0
 def _split_lines(self, text, width):
     if text.startswith('raw|'):
         return text[4:].splitlines()
     return HelpFormatter._split_lines(self, text, width)