コード例 #1
0
ファイル: runPySmell.py プロジェクト: estebank/pysmell
def main():
    """
    Simple demonstration program to show different usages. Comment and uncomment parsers 
    and output streams to try out different combinations. The system is made by using the 
    decorator pattern, so apart from PickleOut, any parser sould be combineable with any 
    output. If you want you should even be able to make decorators to your parsers.
    """

    # List of files to parse
    fileList = ['runPySmell.py']

    # Set the output to use
    outputStream = PrintOut()
    #outputStream = FileOut('somefile')
    
    # Set the parser
    parser = EvalParser(outputStream)
    #parser = PickleOut('somefile') # Be aware, currently pickle out serves as both parser and output stream

    # Get the modules
    modules = process(fileList)

    # Run the task :)
    parser.write(modules)
コード例 #2
0
ファイル: runPySmell.py プロジェクト: wankata/pysmell
def main():
    """
    Simple demonstration program to show different usages. Comment and uncomment parsers 
    and output streams to try out different combinations. The system is made by using the 
    decorator pattern, so apart from PickleOut, any parser sould be combineable with any 
    output. If you want you should even be able to make decorators to your parsers.
    """

    # List of files to parse
    fileList = ['runPySmell.py']

    # Set the output to use
    outputStream = PrintOut()
    #outputStream = FileOut('somefile')

    # Set the parser
    parser = EvalParser(outputStream)
    #parser = PickleOut('somefile') # Be aware, currently pickle out serves as both parser and output stream

    # Get the modules
    modules = process(fileList)

    # Run the task :)
    parser.write(modules)
コード例 #3
0
 def testOptionalOutput(self):
     modules = tags.process(['TestData/PackageA'], [], verbose=True)
     self.assertTrue(isinstance(modules, ModuleDict),
                     'did not return modules')
     self.assertDictsEqual(modules, self.packageA)
コード例 #4
0
ファイル: test_tags.py プロジェクト: estebank/pysmell
 def testOptionalOutput(self):
     modules = tags.process(['TestData/PackageA'], [], verbose=True)
     self.assertTrue(isinstance(modules, ModuleDict), 'did not return modules')
     self.assertDictsEqual(modules, self.packageA)