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

fix: sympy log parser fails to recognize the last test case #212

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yuxqiu
Copy link
Contributor

@yuxqiu yuxqiu commented Aug 26, 2024

What does this implement/fix?

Add additional checking and cleaning steps to the sympy log parser.

Previously, the sympy log parser could not parse the last line of the log file. For example, the following log (where test_intersection_of_duplicate_sets is a test I added manually):

...
test_issue_9447 ok
test_issue_10337 ok
test_issue_10326 ok
test_issue_2799 ok
test_issue_9706 ok
test_issue_8257 ok
test_issue_10931 ok
test_issue_11174 ok
test_finite_set_intersection ok
test_union_intersection_constructor ok
test_Union_contains ok
test_issue_16878b f
test_intersection_of_duplicate_sets F                                     [FAIL]

The current log parser will ignore the last line because there is a text [FAIL] (or [OK]) at the end of that line. This text will appear in the log when all the test functions in the file have been executed. This logic is in leaving_filename function, which will be called at the end of the test_file function.

To fix this, we can simply check to see if there is a [FAIL] or [OK] at the end of the line, and if there is, we can simply delete it and strip the line again.

@yuxqiu yuxqiu changed the title fix: sympy log parser fails to recognize whether the last test case p… fix: sympy log parser fails to recognize the last test case Aug 26, 2024
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 this pull request may close these issues.

1 participant