提交 37ac6830 编写于 作者: C Cleber Rosa

avocado.core.test.Test: make tag_start and tag_end private

As as way to give `avocado.Test` users (test writers) a better sense of what
is the API allowed/intended for their use.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 531838f0
......@@ -174,11 +174,11 @@ class Test(unittest.TestCase):
def __repr__(self):
return "Test(%r)" % self.tagged_name
def tag_start(self):
def _tag_start(self):
self.running = True
self.time_start = time.time()
def tag_end(self):
def _tag_end(self):
self.running = False
self.time_end = time.time()
# for consistency sake, always use the same stupid method
......@@ -432,7 +432,7 @@ class Test(unittest.TestCase):
"""
self._setup_environment_variables()
try:
self.tag_start()
self._tag_start()
self._run_avocado()
except exceptions.TestBaseException, detail:
self.status = detail.status
......@@ -458,7 +458,7 @@ class Test(unittest.TestCase):
for e_line in tb_info:
self.log.error(e_line)
finally:
self.tag_end()
self._tag_end()
self.report()
self.log.info("")
with open(self.logfile, 'r') as log_file_obj:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册