INNER CODE UNIT · Python

filter_tests_by_key

nf-core/tools · nf_core/components/lint/__init__.py:211

    def filter_tests_by_key(self, key):
        """Filters the tests by the supplied key"""
        # Check that supplied test keys exist
        bad_keys = [k for k in key if k not in self.lint_tests]
        if len(bad_keys) > 0:
            raise AssertionError(
                "Test name{} not recognised: '{}'".format(
                    _s(bad_keys),
                    "', '".join(bad_keys),
                )
            )

        # If -k supplied, only run these tests
        self.lint_tests = [k for k in self.lint_tests if k in key]

    def _print_results(self, show_passed=False, sort_by="test", plain_text=False):
        """Print linting results to the command line.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…