# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Phoseg. If not, see <http://www.gnu.org/licenses/>. ################################################################################ """ ❏Phoseg❏ pylint_tests.py """ import os import re from projects_files import getAllFilenames from console import CONSOLE CONSOLE.useTheColor("cyan") CONSOLE.writeln("="*80) CONSOLE.writeln("TEST : pylint_test.py") CONSOLE.writeln("="*80) CONSOLE.useTheDefaultColor() COMMANDSTRING = "pylint --rcfile=pylint.rc {0} > z" NBR_FILES = 0 WORST_MARK = 10 with open("pylint.output","w") as dest: for filename in getAllFilenames(only_py_files=True): if not os.path.exists(filename):
if only_py_files: if fname[-3:] == '.py': resdict[module].append( fname ) else: resdict[module].append( fname ) return resdict ################################################################################ ################################################################################ if __name__ == "__main__": from console import CONSOLE CONSOLE.useTheColor("cyan") CONSOLE.writeln("="*80) CONSOLE.writeln("TEST : projects_files.py") #........................................................................... # existing files not in MODULES dictionary #........................................................................... CONSOLE.writeln("="*80) CONSOLE.writeln("TEST : existing files not in MODULES dictionary :") CONSOLE.useTheDefaultColor() for res in os.walk("."): dirpath = res[0] #dirnames filenames = res[2]