def test_linting_fail(self, runner, tmpdir):
        po_file = build_po_string(
            '#: foo/foo.py:5\n'
            'msgid "Foo %(foo)s bar baz"\n'
            'msgstr "Foo %(bar)s"\n')
        fn = tmpdir.join('messages.po')
        fn.write(po_file)

        result = runner.invoke(cli, ('lint', str(fn)))
        assert result.exit_code == 1
        output_lines = result.output.splitlines()
        assert len(output_lines) == 16
        assert 'E201: invalid variables: %(bar)s' in result.output
dataset/ETHPy150Open willkg/dennis/tests/test_cmdline.py/TestLint.test_linting_fail/original