def test_level(self):
        """
        Default level is L{LogLevel.info} if not set.
        """
        f = LoggingFile(self.logger)
        self.assertEqual(f.level, LogLevel.info)

        f = LoggingFile(self.logger, level=LogLevel.error)
        self.assertEqual(f.level, LogLevel.error)

        Default level is L{LogLevel.info} if not set.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_io.py