def get_requests(self):
"""Parses only first highlighted selection.
"""
view = self.view
self._tests = []
for region in view.sel():
if not region.empty():
selection = view.substr(region)
try:
self._tests = parse_tests(selection)
except Exception as e:
sublime.error_message('Parse Error: there may be unbalanced brackets in tests')
print(e)
break # only parse first selection
return [test.request for test in self._tests]
评论列表
文章目录