Update test_importer to not use rstrip and also to follow the proper @return style
Signed-off-by: Scott Zawalski <[email protected]> --- autotest/utils/test_importer.py 2010-04-14 16:31:18.000000000 -0700 +++ autotest/utils/test_importer.py 2010-04-14 16:31:18.000000000 -0700 @@ -170,7 +170,9 @@ @param add_noncompliant: attempt adding test with invalid control files. """ for profiler in profilers: - name = os.path.basename(profiler).rstrip(".py") + name = os.path.basename(profiler) + if name.endswith('.py'): + name = name[:-3] if not profilers[profiler]: if add_noncompliant: doc = description @@ -325,7 +327,7 @@ @param control_pattern: name format of control file. @param add_noncompliant: ignore control file parse errors. - @return: dictionary of the form: tests[file_path] = parsed_object + @return dictionary of the form: tests[file_path] = parsed_object """ tests = {} profilers = False @@ -349,7 +351,6 @@ found_test = control_data.parse_control(file) tests[file] = found_test else: - script = file.rstrip(".py") tests[file] = compiler.parseFile(file).doc return tests @@ -363,7 +364,7 @@ @param path: base directory to start search. @param wildcard: name format to match. - @return: A list of files that match wildcard + @return A list of files that match wildcard """ files = [] directories = [ path ] @@ -405,7 +406,7 @@ @param whitelist_path: full path to the whitelist file. - @return: set with files listed one/line - newlines included. + @return set with files listed one/line - newlines included. """ f = open(whitelist_path, 'r') whitelist_set = set([line.strip() for line in f]) _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
