running install /usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running install_lib creating test_dir creating test_dir/usr creating test_dir/usr/lib creating test_dir/usr/lib/python3.10 creating test_dir/usr/lib/python3.10/site-packages creating test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/diff_reporter.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/command_runner.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/git_diff.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover creating test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters copying build/lib/diff_cover/violationsreporters/base.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters copying build/lib/diff_cover/violationsreporters/java_violations_reporter.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters copying build/lib/diff_cover/violationsreporters/violations_reporter.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters copying build/lib/diff_cover/violationsreporters/__init__.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters copying build/lib/diff_cover/util.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/report_generator.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/config_parser.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/diff_quality_tool.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/hook.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/diff_cover_tool.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/git_path.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover creating test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/html_coverage_report.html -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/console_quality_report.txt -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/snippet_content.html -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/markdown_quality_report.md -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/snippet_style.html -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/markdown_coverage_report.md -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/console_coverage_report.txt -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/external_style.css -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/snippet_content.txt -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/snippet_content.md -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/templates/html_quality_report.html -> test_dir/usr/lib/python3.10/site-packages/diff_cover/templates copying build/lib/diff_cover/hookspecs.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/__init__.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover copying build/lib/diff_cover/snippets.py -> test_dir/usr/lib/python3.10/site-packages/diff_cover byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/diff_reporter.py to diff_reporter.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/command_runner.py to command_runner.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/git_diff.py to git_diff.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters/base.py to base.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters/java_violations_reporter.py to java_violations_reporter.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters/violations_reporter.py to violations_reporter.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/violationsreporters/__init__.py to __init__.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/util.py to util.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/report_generator.py to report_generator.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/config_parser.py to config_parser.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/diff_quality_tool.py to diff_quality_tool.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/hook.py to hook.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/diff_cover_tool.py to diff_cover_tool.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/git_path.py to git_path.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/hookspecs.py to hookspecs.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/__init__.py to __init__.cpython-310.pyc byte-compiling test_dir/usr/lib/python3.10/site-packages/diff_cover/snippets.py to snippets.cpython-310.pyc writing byte-compilation script '/tmp/tmpwaat15x7.py' /usr/bin/python -Wignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning /tmp/tmpwaat15x7.py removing /tmp/tmpwaat15x7.py running install_egg_info running egg_info creating diff_cover.egg-info writing diff_cover.egg-info/PKG-INFO writing dependency_links to diff_cover.egg-info/dependency_links.txt writing entry points to diff_cover.egg-info/entry_points.txt writing requirements to diff_cover.egg-info/requires.txt writing top-level names to diff_cover.egg-info/top_level.txt writing manifest file 'diff_cover.egg-info/SOURCES.txt' reading manifest file 'diff_cover.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'diff_cover.egg-info/SOURCES.txt' Copying diff_cover.egg-info to test_dir/usr/lib/python3.10/site-packages/diff_cover-6.4.4-py3.10.egg-info running install_scripts Installing diff-cover script to test_dir/usr/bin Installing diff-quality script to test_dir/usr/bin ============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 -- /usr/bin/python cachedir: .pytest_cache rootdir: /build/python-diff-cover/src/diff_cover-6.4.4, configfile: pyproject.toml plugins: mock-3.6.1 collecting ... collected 150 items tests/test_config_parser.py::TestTOMLParser::test_parse_no_toml_file[Tool.DIFF_COVER] PASSED [ 0%] tests/test_config_parser.py::TestTOMLParser::test_parse_no_toml_file[Tool.DIFF_QUALITY] PASSED [ 1%] tests/test_config_parser.py::TestTOMLParser::test_parse_but_no_tomli_installed[Tool.DIFF_COVER] PASSED [ 2%] tests/test_config_parser.py::TestTOMLParser::test_parse_but_no_tomli_installed[Tool.DIFF_QUALITY] PASSED [ 2%] tests/test_config_parser.py::TestTOMLParser::test_parse_but_no_data[Tool.DIFF_COVER-] PASSED [ 3%] tests/test_config_parser.py::TestTOMLParser::test_parse_but_no_data[Tool.DIFF_COVER-[tool.diff_quality]] PASSED [ 4%] tests/test_config_parser.py::TestTOMLParser::test_parse_but_no_data[Tool.DIFF_QUALITY-] PASSED [ 4%] tests/test_config_parser.py::TestTOMLParser::test_parse_but_no_data[Tool.DIFF_COVER-[tool.diff_cover]] PASSED [ 5%] tests/test_config_parser.py::TestTOMLParser::test_parse[Tool.DIFF_COVER-[tool.diff_cover]\nquiet=true-expected0] PASSED [ 6%] tests/test_config_parser.py::TestTOMLParser::test_parse[Tool.DIFF_QUALITY-[tool.diff_quality]\nquiet=true-expected1] PASSED [ 6%] tests/test_config_parser.py::test_get_config_unrecognized_file[Tool.DIFF_COVER] PASSED [ 7%] tests/test_config_parser.py::test_get_config_unrecognized_file[Tool.DIFF_QUALITY] PASSED [ 8%] tests/test_config_parser.py::test_get_config[Tool.DIFF_COVER-cli_config0-defaults0-None-expected0] PASSED [ 8%] tests/test_config_parser.py::test_get_config[Tool.DIFF_QUALITY-cli_config1-defaults1-None-expected1] PASSED [ 9%] tests/test_config_parser.py::test_get_config[Tool.DIFF_COVER-cli_config2-defaults2-[tool.diff_cover]\na=1\nd=6-expected2] PASSED [ 10%] tests/test_diff_cover_main.py::test_parse_coverage_xml PASSED [ 10%] tests/test_diff_cover_main.py::test_parse_range_notation PASSED [ 11%] tests/test_diff_cover_tool.py::test_parse_with_html_report PASSED [ 12%] tests/test_diff_cover_tool.py::test_parse_with_no_report PASSED [ 12%] tests/test_diff_cover_tool.py::test_parse_with_multiple_reports PASSED [ 13%] tests/test_diff_cover_tool.py::test_parse_with_ignored_unstaged PASSED [ 14%] tests/test_diff_cover_tool.py::test_parse_invalid_arg PASSED [ 14%] tests/test_diff_cover_tool.py::test_parse_with_exclude PASSED [ 15%] tests/test_diff_quality_main.py::test_parse_with_html_report PASSED [ 16%] tests/test_diff_quality_main.py::test_parse_with_no_html_report PASSED [ 16%] tests/test_diff_quality_main.py::test_parse_with_one_input_report PASSED [ 17%] tests/test_diff_quality_main.py::test_parse_with_multiple_input_reports PASSED [ 18%] tests/test_diff_quality_main.py::test_parse_with_options PASSED [ 18%] tests/test_diff_quality_main.py::test_parse_with_ignored_unstaged PASSED [ 19%] tests/test_diff_quality_main.py::test_parse_invalid_arg PASSED [ 20%] tests/test_diff_quality_main.py::test_parse_with_exclude PASSED [ 20%] tests/test_diff_quality_main.py::test_parse_with_include PASSED [ 21%] tests/test_diff_quality_main.py::test_parse_diff_range_notation PASSED [ 22%] tests/test_diff_quality_main.py::test_parse_options PASSED [ 22%] tests/test_diff_quality_main.py::test_parse_options_without_quotes PASSED [ 23%] tests/test_diff_reporter.py::test_name PASSED [ 24%] tests/test_diff_reporter.py::test_name_compare_branch PASSED [ 24%] tests/test_diff_reporter.py::test_name_ignore_staged PASSED [ 25%] tests/test_diff_reporter.py::test_name_ignore_unstaged PASSED [ 26%] tests/test_diff_reporter.py::test_name_ignore_staged_and_unstaged PASSED [ 26%] tests/test_diff_reporter.py::test_name_include_untracked PASSED [ 27%] tests/test_diff_reporter.py::test_git_path_selection[include0-exclude0-expected0] PASSED [ 28%] tests/test_diff_reporter.py::test_git_path_selection[include1-exclude1-expected1] PASSED [ 28%] tests/test_diff_reporter.py::test_git_path_selection[include2-exclude2-expected2] PASSED [ 29%] tests/test_diff_reporter.py::test_git_path_selection[include3-exclude3-expected3] PASSED [ 30%] tests/test_diff_reporter.py::test_git_path_selection[include4-exclude4-expected4] PASSED [ 30%] tests/test_diff_reporter.py::test_git_source_paths PASSED [ 31%] tests/test_diff_reporter.py::test_git_source_paths_with_space PASSED [ 32%] tests/test_diff_reporter.py::test_duplicate_source_paths PASSED [ 32%] tests/test_diff_reporter.py::test_git_source_paths_with_supported_extensions PASSED [ 33%] tests/test_diff_reporter.py::test_git_lines_changed PASSED [ 34%] tests/test_diff_reporter.py::test_ignore_lines_outside_src PASSED [ 34%] tests/test_diff_reporter.py::test_one_line_file PASSED [ 35%] tests/test_diff_reporter.py::test_git_deleted_lines PASSED [ 36%] tests/test_diff_reporter.py::test_git_unicode_filename PASSED [ 36%] tests/test_diff_reporter.py::test_git_repeat_lines PASSED [ 37%] tests/test_diff_reporter.py::test_git_overlapping_lines PASSED [ 38%] tests/test_diff_reporter.py::test_git_line_within_hunk PASSED [ 38%] tests/test_diff_reporter.py::test_inter_diff_conflict PASSED [ 39%] tests/test_diff_reporter.py::test_git_no_such_file PASSED [ 40%] tests/test_diff_reporter.py::test_no_diff PASSED [ 40%] tests/test_diff_reporter.py::test_git_diff_error PASSED [ 41%] tests/test_diff_reporter.py::test_plus_sign_in_hunk_bug PASSED [ 42%] tests/test_diff_reporter.py::test_terminating_chars_in_hunk PASSED [ 42%] tests/test_diff_reporter.py::test_merge_conflict_diff PASSED [ 43%] tests/test_diff_reporter.py::test_inclusion_list PASSED [ 44%] tests/test_diff_reporter.py::test_ignore_staged_inclusion PASSED [ 44%] tests/test_diff_reporter.py::test_ignore_unstaged_inclusion PASSED [ 45%] tests/test_diff_reporter.py::test_ignore_staged_and_unstaged_inclusion PASSED [ 46%] tests/test_diff_reporter.py::test_fnmatch PASSED [ 46%] tests/test_diff_reporter.py::test_fnmatch_returns_the_default_with_empty_default PASSED [ 47%] tests/test_diff_reporter.py::test_include_untracked PASSED [ 48%] tests/test_git_diff.py::test_diff_committed PASSED [ 48%] tests/test_git_diff.py::test_diff_unstaged PASSED [ 49%] tests/test_git_diff.py::test_diff_staged PASSED [ 50%] tests/test_git_diff.py::test_diff_missing_branch_error PASSED [ 50%] tests/test_git_diff.py::test_diff_committed_compare_branch PASSED [ 51%] tests/test_git_diff.py::test_errors PASSED [ 52%] tests/test_git_diff.py::test_untracked[-expected0] PASSED [ 52%] tests/test_git_diff.py::test_untracked[\n-expected1] PASSED [ 53%] tests/test_git_diff.py::test_untracked[a.py\n-expected2] PASSED [ 54%] tests/test_git_diff.py::test_untracked[a.py\nb.py\n-expected3] PASSED [ 54%] tests/test_git_path.py::test_project_root_command PASSED [ 55%] tests/test_git_path.py::test_relative_path PASSED [ 56%] tests/test_git_path.py::test_absolute_path PASSED [ 56%] tests/test_git_path.py::test_set_cwd_unicode PASSED [ 57%] tests/test_git_path.py::test_set_cwd_unicode_byte_passed_in_for_cwd PASSED [ 58%] tests/test_java_violations_reporter.py::TestCheckstyleQualityReporterTest::test_no_such_file PASSED [ 58%] tests/test_java_violations_reporter.py::TestCheckstyleQualityReporterTest::test_no_java_file PASSED [ 59%] tests/test_java_violations_reporter.py::TestCheckstyleQualityReporterTest::test_quality PASSED [ 60%] tests/test_java_violations_reporter.py::TestCheckstyleXmlQualityReporterTest::test_no_such_file PASSED [ 60%] tests/test_java_violations_reporter.py::TestCheckstyleXmlQualityReporterTest::test_no_java_file PASSED [ 61%] tests/test_java_violations_reporter.py::TestCheckstyleXmlQualityReporterTest::test_quality PASSED [ 62%] tests/test_java_violations_reporter.py::TestCheckstyleXmlQualityReporterTest::test_quality_error PASSED [ 62%] tests/test_java_violations_reporter.py::TestCheckstyleXmlQualityReporterTest::test_quality_pregenerated_report PASSED [ 63%] tests/test_java_violations_reporter.py::TestFindbugsQualityReporterTest::test_no_such_file PASSED [ 64%] tests/test_java_violations_reporter.py::TestFindbugsQualityReporterTest::test_no_java_file PASSED [ 64%] tests/test_java_violations_reporter.py::TestFindbugsQualityReporterTest::test_quality_pregenerated_report PASSED [ 65%] tests/test_java_violations_reporter.py::TestPmdXmlQualityReporterTest::test_no_such_file PASSED [ 66%] tests/test_java_violations_reporter.py::TestPmdXmlQualityReporterTest::test_no_java_file PASSED [ 66%] tests/test_java_violations_reporter.py::TestPmdXmlQualityReporterTest::test_quality_pregenerated_report PASSED [ 67%] tests/test_report_generator.py::TestSimpleReportGenerator::test_src_paths PASSED [ 68%] tests/test_report_generator.py::TestSimpleReportGenerator::test_coverage_name PASSED [ 68%] tests/test_report_generator.py::TestSimpleReportGenerator::test_diff_name PASSED [ 69%] tests/test_report_generator.py::TestSimpleReportGenerator::test_percent_covered PASSED [ 70%] tests/test_report_generator.py::TestSimpleReportGenerator::test_violation_lines PASSED [ 70%] tests/test_report_generator.py::TestSimpleReportGenerator::test_src_with_no_info PASSED [ 71%] tests/test_report_generator.py::TestSimpleReportGenerator::test_src_paths_not_measured PASSED [ 72%] tests/test_report_generator.py::TestSimpleReportGenerator::test_total_num_lines PASSED [ 72%] tests/test_report_generator.py::TestSimpleReportGenerator::test_total_num_missing PASSED [ 73%] tests/test_report_generator.py::TestSimpleReportGenerator::test_total_percent_covered PASSED [ 74%] tests/test_report_generator.py::TestTemplateReportGenerator::test_combine_adjacent_lines_no_adjacent PASSED [ 74%] tests/test_report_generator.py::TestTemplateReportGenerator::test_combine_adjacent_lines PASSED [ 75%] tests/test_report_generator.py::TestTemplateReportGenerator::test_empty_list PASSED [ 76%] tests/test_report_generator.py::TestTemplateReportGenerator::test_one_number PASSED [ 76%] tests/test_report_generator.py::TestJsonReportGenerator::test_generate_report PASSED [ 77%] tests/test_report_generator.py::TestJsonReportGenerator::test_hundred_percent PASSED [ 78%] tests/test_report_generator.py::TestJsonReportGenerator::test_empty_report PASSED [ 78%] tests/test_report_generator.py::TestStringReportGenerator::test_generate_report PASSED [ 79%] tests/test_report_generator.py::TestStringReportGenerator::test_hundred_percent PASSED [ 80%] tests/test_report_generator.py::TestStringReportGenerator::test_empty_report PASSED [ 80%] tests/test_report_generator.py::TestHtmlReportGenerator::test_generate_report PASSED [ 81%] tests/test_report_generator.py::TestHtmlReportGenerator::test_empty_report PASSED [ 82%] tests/test_report_generator.py::TestHtmlReportGenerator::test_one_snippet PASSED [ 82%] tests/test_report_generator.py::TestHtmlReportGenerator::test_multiple_snippets PASSED [ 83%] tests/test_report_generator.py::TestMarkdownReportGenerator::test_generate_report PASSED [ 84%] tests/test_report_generator.py::TestMarkdownReportGenerator::test_hundred_percent PASSED [ 84%] tests/test_report_generator.py::TestMarkdownReportGenerator::test_empty_report PASSED [ 85%] tests/test_report_generator.py::TestMarkdownReportGenerator::test_one_snippet PASSED [ 86%] tests/test_report_generator.py::TestMarkdownReportGenerator::test_multiple_snippets PASSED [ 86%] tests/test_snippets.py::test_style_defs FAILED [ 87%] tests/test_snippets.py::test_format PASSED [ 88%] tests/test_snippets.py::test_format_with_invalid_start_line PASSED [ 88%] tests/test_snippets.py::test_format_with_invalid_violation_lines PASSED [ 89%] tests/test_snippets.py::test_no_filename_ext PASSED [ 90%] tests/test_snippets.py::test_unicode PASSED [ 90%] tests/test_snippets.py::test_one_snippet PASSED [ 91%] tests/test_snippets.py::test_multiple_snippets PASSED [ 92%] tests/test_snippets.py::test_no_lead_line PASSED [ 92%] tests/test_snippets.py::test_no_lag_line PASSED [ 93%] tests/test_snippets.py::test_one_line_file PASSED [ 94%] tests/test_snippets.py::test_empty_file PASSED [ 94%] tests/test_snippets.py::test_no_violations PASSED [ 95%] tests/test_snippets.py::test_end_range_on_violation PASSED [ 96%] tests/test_snippets.py::test_load_snippets_html PASSED [ 96%] tests/test_snippets.py::test_load_snippets_markdown PASSED [ 97%] tests/test_snippets.py::test_load_utf8_snippets PASSED [ 98%] tests/test_snippets.py::test_load_declared_arabic PASSED [ 98%] tests/test_snippets.py::test_latin_one_undeclared PASSED [ 99%] tests/test_util.py::test_to_unix_path PASSED [100%] =================================== FAILURES =================================== _______________________________ test_style_defs ________________________________ def test_style_defs(): style_str = Snippet.style_defs() expected_styles = load_fixture("snippet.css").strip() # Check that a sample of the styles are present # (use only a sample to make the test more robust # against Pygments changes). for expect_line in expected_styles.split("\n"): > assert expect_line in style_str E AssertionError: assert '.c { color: #408080; font-style: italic } /* Comment */' in 'pre { line-height: 125%; }\ntd.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; pa...nstance */\n.vm { color: #19177C } /* Name.Variable.Magic */\n.il { color: #666666 } /* Literal.Number.Integer.Long */' tests/test_snippets.py:154: AssertionError =============================== warnings summary =============================== tests/test_snippets.py: 178 warnings /usr/lib/python3.10/site-packages/packaging/version.py:111: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release warnings.warn( -- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ FAILED tests/test_snippets.py::test_style_defs - AssertionError: assert '.c {... ================= 1 failed, 149 passed, 178 warnings in 3.47s ================== ==> ERROR: A failure occurred in check().  Aborting...