[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I checked and FunctionTestCase seems to completely break the loader. The tests for FunctionTestCase in the standard library instantiate the class from inside the method of a TestCase so the loader never see them but even the simple test file I attached complete

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-22 Thread Vitalii
Vitalii added the comment: I don't think anyone is using FunctionTestCase -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-22 Thread Chris Jerdonek
Chris Jerdonek added the comment: > then you will have 1 extra test in that module (the imported one), moreover, > that test will be broken. If this is true, then how is anyone able to be using FunctionTestCase in their tests today? Is the feature broken? -- nosy: +chris.jerdonek _

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-21 Thread Vitalii
Vitalii added the comment: If you make an import in a module with your tests >From unittest import FunctionTestCase then you will have 1 extra test in that module (the imported one), moreover, that test will be broken. -- ___ Python tracker

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Vitalii, can you give more context about why you are writing this code, what you expect it to do and why is there a bug? -- nosy: +remi.lapeyre ___ Python tracker _

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-19 Thread Vitalii
Change by Vitalii : -- keywords: +patch pull_requests: +19524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20237 ___ Python tracker ___

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-19 Thread Vitalii
New submission from Vitalii : In [2]: from unittest import FunctionTestCase In [3]: loader.loadTestsFromTestCase(Fu