hdx.utilities.compare

File compare utilities.

compare_files

def compare_files(path1: str,
                  path2: str,
                  encoding: str = "utf-8") -> List[str]

[view_source]

Returns the delta between two files using -, ?, + format excluding lines that are the same.

Arguments:

  • path1 str - Path to first file
  • path2 str - Path to second file

Returns:

  • List[str] - Delta between the two files

assert_files_same

def assert_files_same(path1: str, path2: str, encoding: str = "utf-8") -> None

[view_source]

Asserts that two files are the same and returns delta using.

-, ?, + format if not

Arguments:

  • path1 str - Path to first file
  • path2 str - Path to second file

Returns:

None