-
Notifications
You must be signed in to change notification settings - Fork 203
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
Test suite optimization: Migrate tests to pytest #917
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me so far! 👍 Thanks!
Do you have any open questions / things to discuss?
benchexec/test_util.py
Outdated
from benchexec.util import ProcessExitCode | ||
import tempfile | ||
import os | ||
import stat | ||
import shutil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to use shell utilities as I was getting errors multiple time i.e. FAILED test_util.py::TestRmtree::test_writable_file - AssertionError: Failed to remove directory with file FAILED test_util.py::TestRmtree::test_writable_dir - AssertionError: Failed to remove directory with child directory FAILED test_util.py::TestRmtree::test_nonwritable_file - AssertionError: Failed to remove directory with non-writable file
Hi @PhilippWendler !, according to the Appveyor service I think we need to migrate the tests inside benchexec.tablegenerator first to make sure the pipeline does not fail, let me know if I'm correct or not |
Not sure what you are referring to here, but of course we want to migrate all tests anyway, so just pick the order that makes sense. |
Hi @PhilippWendler, wanted some guidance related the tests |
These tests are test for addon modules, that are not part of BenchExec per se. They require specific installation instructions. The tests are currently not run as part of the BenchExec test suite, and I think we should keep it this ways. |
I'm getting specific errors in the test files in |
Do you mean the failing |
you must've missed the repeating error, the error seems to be |
What error do you mean? Please give exact details, like the line number of the log. I only see |
Turns out this is the issue itself, I misunderstood the traces as an error 🙃 |
@PhilippWendler, I wish to complete this project as soon as possible and I think I would require some help from your side to help solve this problem |
What question do you have? What have you attempted so far? Why didn't it work? |
Currently I haven't worked on the issue yet, I wanted to ask how we could configure |
I guess the usage of If it is ok for pytest's usage of |
so I tried some different methods to solve our issue here and all of them led to no success. I am pretty sure that method is not suitable for our issue here but I would love to get your insights about it |
Well, then I guess we can just set the correct rounding context for the thread that executes the test, right? I.e., change |
yes we can do that by using our |
25ee966
to
ca47383
Compare
so the tests and workflow seems to be working now except that the docker tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decimal.DefaultContext.rounding = decimal.ROUND_HALF_UP | ||
assert decimal.getcontext().rounding == decimal.ROUND_HALF_UP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this can be kept now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried multiple ways so that we can still keep the double-checking assertion but the tests only work when it is removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that whenever this assertion fails, table-generator would do wrong computations! Actually, it would be to have a test that shows that, can you do that? This would then make it clear that we need a way for setting the correct rounding mode.
Will be superseded by #1043. |
No description provided.