Skip to content

Using avocado for parallel linter tests #6078

Answered by pevogam
pevogam asked this question in Q&A
Discussion options

You must be logged in to vote

So to answer my own initial inquiry, I made it work using a class to inherit the avocado test:

import subprocess

from avocado import Test
from avocado.core import exceptions


class LintTest(Test):
    """
    This test invokes all needed linting for a file.

    :param check_file: file to check with all required linters
    """

    def test(self):
        """Perform the actual test."""
        self.log.debug([p for p in self.params.iteritems()])

        check_file = self.params.get("check_file")
        if check_file is None:
            raise ValueError("Missing file to check by all linters")

        self.log.debug("Linting file %s", check_file)
        result = subprocess.run(
    …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pevogam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant