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 |
afe9f94 to
d3eee12
Compare
dfc4cc2 to
40afb37
Compare
40afb37 to
86fea8b
Compare
86fea8b to
04eafd3
Compare
04eafd3 to
5c74dd0
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 |
150d77c to
b3caf72
Compare
769f6f6 to
2033d0f
Compare
2033d0f to
5fa44f2
Compare
5fa44f2 to
9623fe6
Compare
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