(tmpdir)
| 39 | return path |
| 40 | |
| 41 | def test_dummy_metrics_xml_report(tmpdir): |
| 42 | output_file = os.path.join(tmpdir, "results.xml") |
| 43 | source_path = __create_source_file(tmpdir) |
| 44 | addon_path = __create_addon(tmpdir) |
| 45 | args = [ |
| 46 | f'--output-file={output_file}', |
| 47 | f'--addon={addon_path}', |
| 48 | '--xml-version=3', |
| 49 | source_path |
| 50 | ] |
| 51 | |
| 52 | ret, stdout, stderr = cppcheck(args) |
| 53 | assert ret == 0 |
| 54 | assert stderr == '' |
| 55 | assert stdout == f'Checking {source_path} ...\n' |
| 56 | |
| 57 | with open(output_file, 'r') as file: |
| 58 | xml = file.read() |
| 59 | |
| 60 | for expected in __expected_xml: |
| 61 | assert xml.find(expected) >= 0 |
| 62 | |
| 63 | def test_dummy_metrics_stdout(tmpdir): |
| 64 | source_path = __create_source_file(tmpdir) |
nothing calls this directly
no test coverage detected