1. 04 9月, 2015 2 次提交
  2. 03 9月, 2015 8 次提交
    • L
      selftests/functional/test_interrupt.py: Fix NoSuchProcess bug · 8a5e28d8
      Lucas Meneghel Rodrigues 提交于
      If between psutil.procs() and the instantiation of the Process
      object the given pid has terminated, we'll get a NoSuchProcess
      error from psutils. Let's expand the list comprehension to avoid
      getting caught by such a condition.
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      8a5e28d8
    • L
      Merge pull request #775 from clebergnu/selftests_run_for_setuptools_test · 8b60ae24
      Lucas Meneghel Rodrigues 提交于
      Use standard unittest (and setuptools) for execution of selftests 
      8b60ae24
    • C
      selftests/doc/test_doc_build.py: convert to a unittest test · b8bd211f
      Cleber Rosa 提交于
      All other tests (unit and functional) are based on unittest. Let's do
      the same to this one, so that the default unittest discover code finds
      it and runs it.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b8bd211f
    • C
      Selftests: remove evil "simple import magic" · 6149e2dc
      Cleber Rosa 提交于
      Even though I may be the one to blame about coming up with this
      "simple import magic", I believe it was a mistake and we should get
      rid of them.
      
      There are a couple of other ways to actually do development out of
      of a source tree, including running unittests that do not require
      this amount of boiler plate code. Examples include just setting
      the PYTHONPATH environment variable to actually run (setuptools based)
      `python setup.py develop`.
      
      The little bits of what looks like the import magic that was left, is
      not really import magic. It's just that functional tests need to locate
      the Avocado source tree base directory to run the test runner from it.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      6149e2dc
    • C
      Selftests: allow tests to be run with "setup.py test" · 333e439b
      Cleber Rosa 提交于
      One standard setuptools command is "test". That command does some useful
      setup and then runs the test in a verbose mode.
      
      There are a couple of reasons for activating that, including that
      setuptools can help us support a Python 3 version of Avocado by
      running 2to3 and even custom fixers before running the tests, or even
      builds and installs.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      333e439b
    • C
      Selftests: drop nose usage for plain unittest discovery · e9c0d813
      Cleber Rosa 提交于
      The unittest module, and unittest2 backport on Python 2.6, is capable of
      finding unittests and running them. So, effectively, we do not need nose
      at all.
      
      This patch removes the dependency on nose, replacing the run script
      with a version based solely on the unittest module.
      
      One change of functionality is that run now looks and runs tests in the
      standard selftests directories (unit, functional, doc), and does not
      accept command line arguments. If one wants to run a subset of them,
      it's pretty easy to just use the unittest module for that:
      
       $ python -m unittest discover -s selftests/unit
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e9c0d813
    • C
      selftests/functional/test_interrupt.py: silence the test · dae3ea22
      Cleber Rosa 提交于
      When running this functional test with the standard unittest
      discovery/runner it produces output that conflicts with the runner
      output.
      
      It looks like this output is not necessary for the test itself, and
      not that helpful for debugging purposes, so, let's just silence it.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      dae3ea22
    • C
      Selftests: move to adhere to unittest discover default pattern · 24d87eb4
      Cleber Rosa 提交于
      To be honest, our test code could still be kept in the same directories and
      have the same names. But I think we can improve two things here:
      
      1) Flatten a little bit the directory structure of selftests. Two path
      components are being dropped here: "all" and "avocado". So that
      "selftests/all/functional/avocado" becomes simply
      "selftests/functional".
      
      2) File names match what is, by default, recognized by unittest (the
      Standard Library module) based discovery of tests. That means that
      doc_build_test.py becomes test_doc_build.py. Not a big deal IMHO.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      24d87eb4
  3. 15 8月, 2015 2 次提交
  4. 14 8月, 2015 12 次提交
  5. 13 8月, 2015 15 次提交
  6. 12 8月, 2015 1 次提交