Skip to content

_merge_tables_with_empty_tables is never tested #278

@AdrianDAlessandro

Description

@AdrianDAlessandro

The _merge_tables_with_empty_tables function in html.py is not properly used in any of the test cases.

It is only ever called in the case that there are empty_tables in the files being analysed. There are a handful of files that have this, however, they also have no tables["documents"] and therefore the loop has no seen_ids to iterate over.

The loop in question (note that if documents is empty, then so too is seen_ids):

   seen_ids: dict[int, str] = {}
    for i, table in enumerate(documents):
        if "id" in table:
            seen_ids[i] = f"Table {table['id']}."

    for table in empty_tables:
        for seen_id in seen_ids:
            # Never do stuff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions