def test_pyflags_extraction(self): self.assertEqual( mask_flags.parse_helpfull_output(''' --some_flag: Flag description lolnoflag, maybe some help text wrapping or something --[no]bool_flag: Flag description '''), {'--some_flag', '--bool_flag', '--nobool_flag'})
def test_ccflags_extraction(self): self.assertEqual(mask_flags.parse_helpfull_output(''' Header stuff that should be ignored -some_flag (Flag description) lolnoflag, maybe some help text wrapping or something -[no]bool_flag (Flag description) ''', regex=mask_flags.FLAG_HELP_RE_CC), {'--some_flag', '--bool_flag', '--nobool_flag'})