Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove _generate_assert_error_msg and its usage now we have pytest assert rewriting #717

Closed
coretl opened this issue Jan 6, 2025 · 0 comments · Fixed by #711
Closed

Comments

@coretl
Copy link
Collaborator

coretl commented Jan 6, 2025

After #714, this function is no longer necessary:

def _generate_assert_error_msg(name: str, expected_result, actual_result) -> str:
WARNING = "\033[93m"
FAIL = "\033[91m"
ENDC = "\033[0m"
return (
f"Expected {WARNING}{name}{ENDC} to produce"
+ f"\n{FAIL}{expected_result}{ENDC}"
+ f"\nbut actually got \n{FAIL}{actual_result}{ENDC}"
)

Remove it, and change all assert x, _generate_assert_error_msg(...) to bare assert x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant