1. 19 1月, 2018 2 次提交
    • C
      avocado/utils/filelock.py: use alternative way to get process pid in bytes · 6804537a
      Cleber Rosa 提交于
      PEP461 is only available on Python 3.5.  Our CI (Travis) is set to run
      on Python 3.4, and there's no reason not to be compatible with those
      older Python versions IMO.
      
      Let's then use a syntax that will produce the same content, but will
      work on all Python 3.x versions.
      
      Reference: https://docs.python.org/3.5/whatsnew/3.5.htmlSigned-off-by: NCleber Rosa <crosa@redhat.com>
      6804537a
    • C
      selftests/unit/test_safeloader.py: do not rely on assertRegex* methods · 70d525f1
      Cleber Rosa 提交于
      The prevailing coding style of Avocado (unittest.TestCase) tests is to
      use the specialized assert methods, such as assertNotRegexpMatches.
      
      Unfortunately, the regular expression related assertion methods have
      been through a messy renaming.  In theory, assertNotRegexpMatches and
      assertRegexpMatches should be available in Python 3.0 and 3.1, but not
      in Python >= 3.2, where it got renamed to assertRegex and
      assertNotRegex.
      
      In practice, in my system with Python 3.6.3, I see:
      
      >>> unittest.TestCase.assertNotRegexpMatches
      <function TestCase._deprecate.<locals>.deprecated_func at 0x7f3b85b709d8>
      
      But in Travis, with Python 3.4, it's not available:
      
      ERROR: test_directives_regex (selftests.unit.test_safeloader.DocstringDirectives)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/travis/build/avocado-framework/avocado/selftests/unit/test_safeloader.py", line 135, in test_directives_regex
          self.assertNotRegexpMatches(directive, safeloader.DOCSTRING_DIRECTIVE_RE)
      AttributeError: 'DocstringDirectives' object has no attribute 'assertNotRegexpMatches'
      
      Let's simplify things and just use a regex match and check for its
      result.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      70d525f1
  2. 18 1月, 2018 1 次提交
  3. 17 1月, 2018 1 次提交
    • W
      utils.cpu: Update cpu info pattern for aarch64 · f1030aed
      Wayne Sun 提交于
      arm64 or aarch64 pattern is not easy to identify in the
      cpuinfo. For v7 there is model name in the cpuinfo and it
      could be regonize as arm for 32 bit. But in v8 only could
      found 'CPU architecture' in the cpuinfo and current code
      will fail to match and return i386 which is wrong.
      
      For fix this, if 'CPU architecture' found in cpuinfo, use
      platform.machine to return the arch name.
      Signed-off-by: NWayne Sun <gsun@redhat.com>
      f1030aed
  4. 16 1月, 2018 10 次提交
  5. 12 1月, 2018 2 次提交
  6. 10 1月, 2018 8 次提交
  7. 09 1月, 2018 5 次提交
  8. 08 1月, 2018 3 次提交
  9. 04 1月, 2018 4 次提交
  10. 03 1月, 2018 1 次提交
  11. 02 1月, 2018 3 次提交