utils¶
- boto3_dataclass.utils.compare_code(code: str, expected: str, dedent: bool = True, debug: bool = False) bool[source]¶
Compares whether two pieces of code are identical, ignoring whitespace and indentation.
- Parameters:
code – The generated code string.
expected – The expected code string.
- Returns:
Returns True if the two code strings are identical after ignoring whitespace and indentation; otherwise, returns False.