Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply black on tests #1623

Closed
wants to merge 3 commits into from

Commits on Oct 18, 2021

  1. Linting tests with black and exclude old tests

    Currently, we are using 4 tools: black, pylint, isort and mypy.
    We want to run all 4 of them on our tests for the new codebase to make
    it more readable and maintainable, but we don't want to run it on the
    old test files as they are following the old style guidelines.
    
    In order to achieve that we want to use an exclusion list instead of
    an inclusion list as the new code base will be developed in the future
    and new test files will appear. On another hand, we don't expect any
    more additional test files against the old code, so this list is static.
    
    I decided to hardcode the names we want to exclude because that way we
    won't have to remove the Git history, as opposed to renaming or moving
    the old test files.
    Even though the list is big around 30 files, I think this solution is
    fine as this list will only contain files testing the old code meaning
    the list will have static content.
    
    I will apply each of the linters in a separate pr.
    
    Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
    MVrachev committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    2bc8b61 View commit details
    Browse the repository at this point in the history
  2. Apply black on the tests of the new code

    All of the changes included are a result of applying black
    on our tests on the new code.
    
    Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
    MVrachev committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    37f686a View commit details
    Browse the repository at this point in the history
  3. Rename & simplify a couple of tests in test_api.py

    Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
    MVrachev committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    8dd6d8c View commit details
    Browse the repository at this point in the history