自动化测试框架 Robot Framework 使用快速入门(6)

发表于:2011-10-08来源:未知作者:领测软件测试网采编点击数: 标签:
def status_should_be(self, expected_status): if expected_status != self._status: raise AssertionError(Expected status to be %s but was %s % (expected_status, self._status)) def _run_command(self, comm

  def status_should_be(self, expected_status):

  if expected_status != self._status:

  raise AssertionError("Expected status to be '%s' but was '%s'"

  % (expected_status, self._status))

  def _run_command(self, command, *args):

  command = '"%s" %s %s' % (self._sut_path, command, ' '.join(args))

  process = os.popen(command)

  self._status = process.read().strip()

  process.close()

原文转自:http://www.ltesting.net