Skip to content
  • SeongJae Park's avatar
    kunit: tool: Assert the version requirement · df4b0807
    SeongJae Park authored
    Commit 87c9c163
     ("kunit: tool: add support for QEMU") on the 'next'
    tree adds 'from __future__ import annotations' in ''.
    Because it is supported on only >=3.7 Python, people using older Python
    will get below error:
        Traceback (most recent call last):
          File "./tools/testing/kunit/", line 20, in <module>
            import kunit_kernel
          File "/home/sjpark/linux/tools/testing/kunit/", line 9
            from __future__ import annotations
        SyntaxError: future feature annotations is not defined
    This commit adds a version assertion in '', so that people get
    more explicit error message like below:
        Traceback (most recent call last):
          File "./tools/testing/kunit/", line 15, in <module>
            assert sys.version_info >= (3, 7), "Python version is too old"
        AssertionError: Python version is too old
    Signed-off-by: default avatarSeongJae Park <>
    Acked-by: default avatarDaniel Latypov <dlatypov@...>