wstlwl 发表于 2017-4-26 07:57:30

python logging note

Attribute Error: 'function' object has no attribute 'rfind'

bounded, unbounded 和没有使用 () 有关

class SomeTest( unittest.TestCase ):
    def testSomething( self ):
      log= logging.getLogger( "SomeTest.testSomething" )
      log.debug( "this= %r", self.this )
      log.debug( "that= %r", self.that )
      # etc.
      self.assertEquals( 3.14, pi )

if __name__ == "__main__":
    logging.basicConfig( stream=sys.stderr )
    logging.getLogger( "SomeTest.testSomething" ).setLevel( logging.DEBUG )
    unittest.main()
页: [1]
查看完整版本: python logging note