提交 f43f548d 编写于 作者: L Lucas Meneghel Rodrigues

Merge pull request #882 from clebergnu/misc_fixes

Miscellaneous fixes
......@@ -18,7 +18,7 @@ The core Avocado application.
import os
from .log import configure
from .log import configure as configure_log
from .parser import Parser
from .plugins.manager import get_plugin_manager
......@@ -34,7 +34,7 @@ class AvocadoApp(object):
# Catch all libc runtime errors to STDERR
os.environ['LIBC_FATAL_STDERR_'] = '1'
configure()
configure_log()
self.plugin_manager = None
self.parser = Parser()
self.parser.start()
......
......@@ -166,7 +166,7 @@ class TestRunner(object):
Creates an instance of TestRunner class.
:param job: an instance of :class:`avocado.core.job.Job`.
:param test_result: an instance of :class:`avocado.core.result.TestResult`.
:param test_result: an instance of :class:`avocado.core.result.TestResultProxy`.
"""
self.job = job
self.result = test_result
......
from avocado.core.plugins import plugin
class HelloWorld(plugin.Plugin):
"""
The classical Hello World! plugin example.
"""
name = 'hello_world'
enabled = True
def configure(self, parser):
"""
Add the subparser for the 'hello' action.
"""
self.parser = parser.subcommands.add_parser(
'hello',
help='Hello World! plugin example')
super(HelloWorld, self).configure(self.parser)
def run(self, args):
"""
This method is called whenever we use the command 'hello'.
"""
print(self.__doc__)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册