-
Notifications
You must be signed in to change notification settings - Fork 217
Use skip markers in tests #4188
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
base: develop
Are you sure you want to change the base?
Conversation
@Flamefire How about only allowing So we should conditionally extend |
d5fb240 to
fa05f50
Compare
I guess you meant to insert a NOT somewhere as no tests should be skipped on push to develop.
Makes sense, however we should be more selective here. I hence added a dedicated decorator for that which doesn't produce output for PRs (i.e. silently succeeds) and make use of |
f76b45c to
65320fb
Compare
65320fb to
c7f4ee9
Compare
05c14fe to
2a38d1e
Compare
4040414 to
149f7ec
Compare
|
Resolved |
27abdeb to
dc77998
Compare
|
@Flamefire tests are failing now because some tests produces some unexpected (trace) output: |
|
That's actually a side effect of the changed default for As we do a lot of stdout/stderr mocking and/or disabling it again in the tests I disabled it by default now. If you want that separately: #5053 |
883121b to
54969a1
Compare
|
Ok, the other skip sign was caused by an incomplete conflict resolution which was impossible to find with the current approach. I added a list of skipped tests at the end. The expected ones should be marked with We could on CI completely ignore ".s." (already done) and (instead of |
65fd048 to
480fcaa
Compare
|
Rebased due to conflict by other PR |
|
@Flamefire Needs more conflict resolving. Sorry for dragging this on so long, it's a huge PR to review... |
480fcaa to
a41450b
Compare
|
Rebased to fix
I know sorry for that. If you view the diff without whitespace changes it gets better at least |
a41450b to
0c9090e
Compare
The pip-installable pysvn is incomplete and the full one is not easy to install.
Simply return if `$TEST_EASYBUILD_MODULES_TOOL` is not set to Lmod. This avoids any "skip" output on CI
For PRs silently skip the tests when no token is available else use a skip. On GHA force enable the tests when the source repo is 'easybuilds' so a token is expected to be available.
As that is used a lot use that for better describing the purpose.
GC3Pie on Python 3.11 does not work: gc3pie/gc3pie#674 So avoid the skip mark for that.
On CI we don't want the full output of --verbose but fail when tests are skipped. This is only indicated by a "s" inbetween many dots. So show a list of skipped tests and their reason at the end. This also allows easy filtering.
Successful output looks like this > ...............................................s...................................................................................... > ................................................................................................................... > ---------------------------------------------------------------------- > Ran 946 tests in 714.512s > > OK (skipped=3) We only care about the part until "Ran xxx tests" not including the divider (dashes). Also we can ignore any lines with just "s" and ".".
0c9090e to
13f8f11
Compare
From #3790
We can use the more conventional
@unittest.skipIforself.skipTestmarkers to skip tests instead of C&P of conditions which might be wrong (some were)An approach taken from IIRC PyTorch is to define own decorators
requiresFooas a wrapper around a specificskipIfwhich is reusable and easier to understand.Only issue I can see is with the change to CI to ignore all skipped tests as now that I look at it previously we were able to selectively ignore some skipped tests.
So maybe we should not allow any skipped tests on CI which usually means installing additional Python packages. And for the tests requiring a github token we then need to resort back to the old approach but maybe we can still use a decorator here