After looking at the source of the nose, in particular the selector.py file, if you look at whatβs happening,
https://github.com/nose-devs/nose/blob/master/nose/selector.py#L129
When checking, if we wantFile , wantFile is self.matches , which then does a regex lookup against the match that you would pass as testMatch .
The problem occurs when you then check later (and, in this file),
https://github.com/nose-devs/nose/blob/master/nose/selector.py#L152
The same type of checks is wantFunction .
This means that if you have a different structure for your package, your pyfile and your actual test class / function, you need to create a crazy complex regular expression to match this at every step.
For me, when I found out about this, I decided to prefix my packages, containers and test functions with a common bit, i.e.
setests βββ __init__.py βββ setest_area1.py βββββ def setest_someblock(): ...
And then my nose team works like,
nose --testMatch="setest"
Then it filters, as I expect it to work.
seaders Jan 12 '17 at 19:51 on 2017-01-12 19:51
source share