1. 04 4月, 2017 2 次提交
  2. 03 4月, 2017 8 次提交
  3. 01 4月, 2017 4 次提交
  4. 31 3月, 2017 8 次提交
  5. 30 3月, 2017 1 次提交
  6. 29 3月, 2017 3 次提交
  7. 28 3月, 2017 7 次提交
  8. 27 3月, 2017 2 次提交
  9. 25 3月, 2017 1 次提交
  10. 24 3月, 2017 3 次提交
  11. 23 3月, 2017 1 次提交
    • L
      Add TestFail, TestError and TestCancel to the avocado namespace · 7ecf09fa
      Lucas Meneghel Rodrigues 提交于
      In many cases when you are developing a test suite using
      avocado libraries, you want to flag certain exceptional
      conditions as real test failures, rather than something
      that will be converted to an ERROR status (the current
      default behavior).
      
      Consider QEMU testing: An exception involving a QEMU core
      dump should be considered a failure in pretty much every
      scenario one can think of. So it makes sense to have code
      similar to:
      
      from avocado import TestFail
      
      QEMUCoreDump(TestFail):
          pass
      
      so that when said exception happens inside library code,
      the test can be immediately flagged as a failure, without
      having to introduce boilerplate code to check for error
      conditions.
      
      So at least the 3 main test related exceptions (TestFail,
      TestError and TestCancel) should be directly exposed in
      the test writer API. Methods such as self.fail() are
      neat shortcuts for simpler cases and should be used,
      but entirely isolating access to *all* avocado exceptions
      is detrimental to the goal of reducing boilerplate code
      in tests.
      
      This patch adds the mentioned 3 test exceptions to the
      avocado namespace, making them part of the test writer
      API.
      Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
      7ecf09fa