def test_invalidfile(self):
        # local imports only
        from oelint_adv.__main__ import arguments_post
        from oelint_adv.__main__ import run

        _args = arguments_post(self._create_args_parser().parse_args(
            ['/does/not/exist']))
        issues = [x[1] for x in run(_args)]
        assert (not any(issues))
    def test_nonquiet(self, input):
        # local imports only
        from oelint_adv.__main__ import arguments_post
        from oelint_adv.__main__ import run

        _args = arguments_post(self._create_args_parser().parse_args(
            [self._create_tempfile(k, v) for k, v in input.items()]))
        issues = [x[1] for x in run(_args)]
        assert (any(issues))
Beispiel #3
0
 def _create_args_fix(self, input, extraopts=None):
     if extraopts is None:
         extraopts = []
     from oelint_adv.__main__ import arguments_post
     return arguments_post(self._create_args_parser().parse_args(
         # noqa: W504 - we need to concat lists here
         ['--quiet', '--fix', '--nobackup'] +
         # noqa: W504 - we need to concat lists here
         self.__pytest_empty_object_fixture(extraopts, []) +
         [self._create_tempfile(k, v) for k, v in input.items()], ))