def test_readNext2(self) : dataIn = ['/file/path.iced:6', '/file-2-path.iced:8', '/file-2-path.iced:12'] pyOutPutParse.writeFile(dataIn) dataOut = pyOutPutParse.read('/file-2-path.iced:6', "next") color.green("dataOut") print(dataOut) expected = '/file-2-path.iced:8' self.assertEqual (dataOut, expected)
def openNextOrPrev(self, move): view = self.window.active_view() region1 = view.sel()[0] if(region1 is not None): line = view.line(region1) (row, col) = view.rowcol(line.begin()) lineNumber = row + 1 else: lineNumber = 0 filename = view.file_name() fileNameAndLine = filename + ":" + str(lineNumber) result = pyOutPutParse.read(fileNameAndLine, move) if not result: sublime.status_message("no data in file") else: self.window.open_file(result, sublime.ENCODED_POSITION)