def test_testName(self):
        color.blue("test here baby")

        filename1 = os.path.join(currentFolder, '../testPoligon/py/as/a.py')
        position1 = len("""import b_model2 as b_model

import unittest
import sys
sys.path.insert(0, '/Users/maks/Library/Application Support/Sublime Text 3/Packages/util')
import color



class Test(unittest.TestCase):
    
    def test_bigFile(self):
        color.blue("test here baby")
        

        expected = ['', 'startsLikeCodeNumber']
        


        result = b_model.getO""")
      
        result = navigateToModel.filenameAndPositionTransform(filename1, position1)

        expected = ('/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo/testPoligon/py/as/b_model2.py', 
            790)
        print(result)
        self.assertEqual(result, expected)
    def test_testName(self):
        filename1 = '/Users/maks/Dropbox/nodeApps/call/db.iced'
        position1 = 626
      
        result = navigateToModel.filenameAndPositionTransform(filename1, position1)

        expected = ('/Users/maks/Dropbox/nodeApps/call/db.iced', 868 )
        self.assertEqual(result, expected)
	def test_testName(self):
		color.blue("test here baby")
		filename=os.path.dirname(os.path.realpath(__file__)) + "/poligon/debug2.py"
		position=717
		(resultFile, resultPosition) = navigateToModel.filenameAndPositionTransform(filename, position)
		expectedFile = "/Users/maks/Library/Application Support/Sublime Text 3/Packages/util/assertMy.py"
		expectedPosition = 1861
		assertMy.equals(resultFile, expectedFile)
		self.assertEqual(resultPosition, expectedPosition)
	def test_testName(self):
		color.blue("test here baby")
		filename="/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo/testPoligon/findUsagesModelPoligon.py"
		position=185
		(resultFile, resultPosition) = navigateToModel.filenameAndPositionTransform(filename, position)
		expectedFile = "/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo/navigateToModel.py"
		expectedPosition = 1309
		assertMy.equals(resultFile, expectedFile)
		self.assertEqual(resultPosition, expectedPosition)
	def test_testName(self):
		color.blue("test here baby")
		filename=os.path.join(currentFolder, '../../find_usages_plugin.py')
		position= 626
		(resultFile, resultPosition) = navigateToModel.filenameAndPositionTransform(filename, position)
		expectedFile = os.path.join(currentFolder, '../../findUsages/reactOnCursorPosition.py')
		expectedPosition = 159
		assertMy.equals(resultFile, expectedFile)
		self.assertEqual(resultPosition, expectedPosition)
	def test_testName(self):
		color.blue("test here baby")
		filename=os.path.join(currentFolder, '../testPoligon/debug.py')
		position=374
		(resultFile, resultPosition) = navigateToModel.filenameAndPositionTransform(filename, position)
		expectedFile = os.path.join(currentFolder, '../testPoligon/folder1/a.py"')
		expectedPosition = 20
		assertMy.equals(resultFile, expectedFile)
		self.assertEqual(resultPosition, expectedPosition)
	def test_testName(self):
		color.blue("test here baby")
		currentFolder = os.path.dirname(os.path.realpath(__file__))
		filename = os.path.join(currentFolder, '../testPoligon/debug.py')
		position=381
		(resultFile, resultPosition) = navigateToModel.filenameAndPositionTransform(filename, position)
		expectedFile = "/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo/testPoligon/folder1/a.py"
		expectedPosition = 20
		assertMy.equals(resultFile, expectedFile)
		self.assertEqual(resultPosition, expectedPosition)
    def test_testName(self):
        color.blue("test here baby")
        filename1 = '/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo/testPoligon/clip_clear_to_file.py'
        position1 = 568
      
        result = navigateToModel.filenameAndPositionTransform(filename1, position1)

        expected = ('/Users/maks/Library/Application Support/Sublime Text 3/Packages/moveNearReplace/filer2.py', 705 )
            
        print(result)
        self.assertEqual(result, expected)
    def test_testName(self):
        color.blue("test here baby")

        filename1 =  os.path.join(currentFolder, '../testPoligon/debugLocalFunc.py')
        position1 = 2152
      
        result = navigateToModel.filenameAndPositionTransform(filename1, position1)

        expected = (filename1, 1235)
            
        print(result)
        self.assertEqual(result, expected)
    def run(self):
        view = self.window.active_view()
        region1 = view.sel()[0]
        position = region1.a
        view = self.window.active_view()
        filename = view.file_name()

        if filename and os.path.isfile(filename):

            (filename2, position2) = navigateToModel.filenameAndPositionTransform(filename, position)
            msg = "found: {0} {1}".format(filename2, position2)
            window = self.window
            if filename2 != filename:
                self.window.open_file(filename2)
                view = self.window.active_view()
            target_region = sublime.Region(position2, position2)
            view.sel().clear()
            view.sel().add(target_region)
            view.show(target_region)
        else:
            msg = "no such file exists on disk " + str(filename)

        print(msg)
        sublime.status_message(msg)
    def test_testName(self):
        color.blue("test here baby")
        currentFolder = os.path.dirname(os.path.realpath(__file__))
        filename1 = os.path.join(currentFolder, '../testPoligon/py/a.py')
        position1 = len("""import b_model

import unittest
import sys
sys.path.insert(0, '/Users/maks/Library/Application Support/Sublime Text 3/Packages/util')
import color



class Test(unittest.TestCase):
    
    def test_bigFile(self):
        color.blue("test here baby")
        

        expected = ['', 'startsLikeCodeNumber']
        


        result = b_model.getO""")
        print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('filename1: ', filename1, 'position1 = ', position1)
        result = navigateToModel.filenameAndPositionTransform(filename1, position1)

        expected = ('/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo/testPoligon/py/b_model.py', len("""import re
# def getRel(linetext, fulltext):

def reverseStr(stra):
    return stra[::-1]
def stopChar(ch):
    stopChars = [' ', ',', '@']
    return any(i for i in stopChars if i == ch)
def stopLine(ch):
    stopChars = ['\n']
    return any(i for i in stopChars if i == ch)    

def getLine(text, position):
    objectMethod = getSubstr(text, position, stopLine)    
    return objectMethod

def getSubstr(text, position, stopMethod):
    part_a = text[:position]
    rev_a = reverseStr(part_a)
    a = position
    for s in rev_a:
        
        if stopMethod(s):
            break
        a = a - 1 
    part_b = text[position:]    
    b = position
    for s in part_b:
        if stopMethod(s):
            break;
        b = b + 1

    result = text[a:b]     
    return result
def """))
        print(result)
        self.assertEqual(result, expected)