Commits

Tuk Bredsdorff committed fc56a8b

Spelling: classnames -> class_names.

Comments (0)

Files changed (2)

Support/moai_helper.py

 from plumbum import cli
 
 
-def find_classnames(html_docs_path):
+def find_class_names(html_docs_path):
 	'''
 		Returns a list of comepletions passed from the html docs in the moai-sdk.
 		
 	DESCRIPTION = 'Generates completions in .tmPreferences format for TextMate.'
 	
 	def main(self, filename):
-		classnames = find_classnames(filename)
-		tmpreferences = generate_tmpreferences(classnames)
+		class_names = find_classnames(filename)
+		tmpreferences = generate_tmpreferences(class_names)
 		print tmpreferences
 
 

Support/test_moai_helper.py

 
 from __future__ import unicode_literals
 
-from moai_helper import find_classnames, generate_tmpreferences
+from moai_helper import find_class_names, generate_tmpreferences
 
+# TODO: Un-hardcode paths..
 html_docs_dir = '/Users/tuk/KKreationer/moai-sdk/docs/html-lua/html'
 classes_file = 'classes.html'
 html_classes_path = '{0}/{1}'.format(html_docs_dir, classes_file)
 
 
-def test_find_classnames():
+def test_find_class_names():
 	'''
 		Check if classnames are properly parsed from the html.
 	'''
 	
-	classnames = find_classnames(html_classes_path)
-	assert 'MOAIAction' in classnames
-	assert 'MOAIGfxQuadDeck2D' in classnames
+	class_names = find_class_names(html_classes_path)
+	assert 'MOAIAction' in class_names
+	assert 'MOAIGfxQuadDeck2D' in class_names
 
 
 def test_generate_tmpreferences():
 		A very basic test. Checks if a classname is found in the rendered plist.
 	'''
 	
-	classnames = find_classnames(html_classes_path)
-	tmpreferences_str = generate_tmpreferences(classnames)
+	class_names = find_class_names(html_classes_path)
+	tmpreferences_str = generate_tmpreferences(class_names)
 	assert tmpreferences_str.find('MOAIGfxQuadDeck2D')