Closed AbdealiLoKo closed 8 years ago
According to the last function at http://nose.readthedocs.io/en/latest/plugins/attrib.html
nose-attrib just ignores this. I uses im_class
if found, else ignores the class completely (In py3 im_class doesnt exist).
Which is not correct ... Atleast we try to do something better using the magic at https://github.com/AbdealiJK/pytest-attrib/commit/9c762ae89803df2cd8e9b58028b69b75b1c828c5#diff-d4305ea4d8fc4a0a5841dab8ef2f921cR51
Making a test and marking as xfail
for now. no tool seems to handle this python3 case ... (As far as I know). If we find a better method to do this, I'll implement it. But until then, some of the tests will not be detected correctly.
:+1:
Also ran it on travis with pywikibot-core:
Tested the logs using http://pastebin.com/FnMQThYK and found that pytest-attrib only selects more tests than nose-attrib. All of those should be selected, so there seems to be some issue with nose-attr because it doesnt select it.
:sparkles:
Not all tests of Subclasses are being used correctly. Here is the related build error: https://travis-ci.org/AbdealiJK/pytest-attrib/jobs/131589397
Here, if I have:
And run
-a xyz
, the following functions are "found" by the pytest-attrib hook:The same in python2 is:
So, it can be seen that in Python2 it clearly has TwoTest.test_one for the
test_one
inherited into TwoTest. In python3 because all class methods are considered as functions, this distinctions isnt there aymore :|