def test_testName(self):
		color.blue("test here baby")
		inputText = """def run(self):
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       window = self.window"""
		result = clear.py(inputText)
		expected = """def run(self):
       window = self.window"""
	
		
		assertMy.stringDiffByLines(result, expected	)

		self.assertEqual(result, expected)
	def test_testName(self):
		color.blue("test here baby")
		inputText = """\nimport sublime, sublime_plugin\nimport sys\nsys.path.insert(0, "'"/Users/maks/Library/Application Support/Sublime Text 3/Packages/clear"'")\nimport clearModel\nclass plugin_window_clear_Command(sublime_plugin.WindowCommand):\n    def run(self):\n    \tview = self.window.active_view()\n    \tfilename = view.file_name()\n    \tclearModel.pyFile(filename)\n"""

		result = clear.py(inputText)

		

		expected = inputText
		color.red('expected')
		print(expected)
		color.red('result')
		print(result)

		assertMy.stringDiffByLines(result, expected)
	def test_testName(self):
		color.blue("test here baby")
		inputText = """import sublime
import sublime_plugin
import os
from os import listdir
from os.path import isfile, join
import sys
sys.path.insert(0, '/Users/maks/Library/Application Support/Sublime Text 3/Packages/goodPath')

import findAllRelative_model
class repaire_relative_paths_plugin_Command(sublime_plugin.WindowCommand):
    def run(self):
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       print("new run repaire_relative_paths_plugin_")
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       window = self.window
       view = window.active_view()
       filename = view.file_name()
       findAllRelative_model.goAndWrite(filename)
       sublime.status_message("repaire_relative_paths_plugin done")
       


"""
		result = clear.py(inputText)
		expected = """import sublime
import sublime_plugin
import os
from os import listdir
from os.path import isfile, join
import sys
sys.path.insert(0, '/Users/maks/Library/Application Support/Sublime Text 3/Packages/goodPath')
import findAllRelative_model
class repaire_relative_paths_plugin_Command(sublime_plugin.WindowCommand):
    def run(self):
       window = self.window
       view = window.active_view()
       filename = view.file_name()
       findAllRelative_model.goAndWrite(filename)
       sublime.status_message("repaire_relative_paths_plugin done")"""
	
		
		assertMy.stringDiffByLines(result, expected	)
	def test_testName(self):
		color.blue("test here baby")
		inputText = """if inlist:
			print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
			color.red('inlist')
			print(inlist)
			print('*****************************************************************')
			currentIndex = allList.index(current) #todo: make test to test when current item not in list
			chooseNumber =  currentIndex + 1
			if chooseNumber >= len(allList):"""

		result = clear.py(inputText)

		color.red('result')
		print(result)
		expected = """if inlist:
			currentIndex = allList.index(current) #todo: make test to test when current item not in list
			chooseNumber =  currentIndex + 1
			if chooseNumber >= len(allList):"""
		color.red('expected')
		print(expected)
		self.assertEqual(result, expected)
	def test_testName(self):
		color.blue("test here baby")
		inputText = """
    def run(self):
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       print("new run repaire_relative_paths_plugin_")
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
       window = self.window
       
       


"""
		result = clear.py(inputText)
		expected = """
    def run(self):
       window = self.window
       """
	
		
		assertMy.stringDiffByLines(result, expected	)
Пример #6
0
	def test_testName(self):
		inputText = """hellow\n\nworld"""

		result = clear.py(inputText)
		expected = """hellow\nworld"""	
		self.assertEqual(result, expected)