add support for passing valid unittest options to test suite#3790
add support for passing valid unittest options to test suite#3790boegel merged 3 commits intoeasybuilders:developfrom
Conversation
f3a8c53 to
593fd58
Compare
|
I remember something about 9d04087 So maybe the check should look for skipped tests? Or just ignore this for now... |
095ed85 to
fb96f85
Compare
|
These changes break the way we're currently filtering tests from This is supposed to filter all tests down to just the ones that include |
But they allow the proper way: Edit: BTW: The failing test is due to a faulty usage |
OK, but can we somehow automagically translate Many people are used to filtering tests by just passing a pattern, and this still works for the individual subsuites: (so does |
Not sure. I'm afraid that would be hacky and could be ambiguous and/or break things. As far as I can tell this way now is the "correct" way (i.e. as documented by unittest) so if people now have to pass an additional |
24a3028 to
f8b2f54
Compare
08534c1 to
afe9f94
Compare
afe9f94 to
d3eee12
Compare
dfc4cc2 to
40afb37
Compare
|
Rebased this and the other PR. I just ran again in a case where I would have wanted to use e.g. I found a way to support the current test filtering: If the 2nd argument starts with a dash the new method is used, otherwise the old one. So when using unittest you can do |
Running the suite now allows to pass any valid unittest args, such as
-kfor filtering or--verbosefor more detailed output (really missed that in #3780) similar to easybuilders/easybuild-easyconfigs@17379db in the EC repoSee also #4188 (previously contained here, not anymore but might cause simple conflicts)
The added
else-branch added to each test suite/file are to support the "old way" of selecting tests as requested at #3790 (comment)IMO the unittest style filtering is more powerful and the transition easy:
python3 -m test.framework.modules loadbecomespython3 -m test.framework.modules -k loadbut some might rely on the current behavior so we can keep it for now