[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2022-03-06 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2022-03-06 Thread Géry
Change by Géry : -- nosy: +maggyero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2022-01-09 Thread Inada Naoki
Inada Naoki added the comment: New changeset 0b2b9d251374c5ed94265e28039f82b37d039e3e by Inada Naoki in branch 'main': bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745) https://github.com/python/cpython/commit/0b2b9d251374c5ed94265e28039f82b37d039e3e --

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-11-25 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.11 -Python 3.10, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-11-24 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +27982 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29745 ___ Python tracker ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-11-22 Thread Adam Johnson
Adam Johnson added the comment: I just reported https://bugs.python.org/issue45864 , and closed as duplicate of this. -- nosy: +adamchainz ___ Python tracker ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-07-08 Thread Eric V. Smith
Eric V. Smith added the comment: As the author of PEP 420, I think having test discovery support namespace packages is a mistake, at least in the sense of pretending every directory is a namespace package. -- nosy: +eric.smith ___ Python tracker

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-22 Thread Inada Naoki
Inada Naoki added the comment: I noticed that namespace package support has been broken since this commit. https://github.com/python/cpython/commit/bbbcf8693b876daae4469765aa62f8924f39a7d2 Now namespace pacakge has __file__ attribute which is None. But... try:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-22 Thread Md Jony Hossain Habib
Md Jony Hossain Habib added the comment: diff -r 293d9964cf6e Lib/unittest/loader.py --- a/Lib/unittest/loader.pyTue Apr 28 00:04:53 2015 -0400 +++ b/Lib/unittest/loader.pyTue Apr 28 10:12:07 2015 +0300 @@ -338,7 +338,7 @@ raise ImportError('Start directory is not

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From the merge: +++ b/Doc/library/unittest.rst @@ -330,7 +330,9 @@ Test modules and packages can customize test loading and discovery by through the `load_tests protocol`_. .. versionchanged:: 3.4 - Test discovery supports :term:`namespace packages `.

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-22 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
miss-islington added the comment: New changeset 30fe3ee6d39fba8183db779f15936fe64cc5ec85 by Miss Islington (bot) in branch '3.9': bpo-23882: Doc: Clarify unittest discovery document (GH-21560) https://github.com/python/cpython/commit/30fe3ee6d39fba8183db779f15936fe64cc5ec85 --

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
miss-islington added the comment: New changeset 9dd018e35cce30bc2545290b6083dbf6e50d7b61 by Miss Islington (bot) in branch '3.8': bpo-23882: Doc: Clarify unittest discovery document (GH-21560) https://github.com/python/cpython/commit/9dd018e35cce30bc2545290b6083dbf6e50d7b61 --

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +23405 pull_request: https://github.com/python/cpython/pull/24621 ___ Python tracker ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington, miss-islington, miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401, 23403, 23404 pull_request: https://github.com/python/cpython/pull/24619 ___ Python tracker

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington, miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401, 23403 pull_request: https://github.com/python/cpython/pull/24619 ___ Python tracker

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington, miss-islington, miss-islington, miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401, 23402, 23403, 23404 pull_request: https://github.com/python/cpython/pull/24619

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400 pull_request: https://github.com/python/cpython/pull/24619 ___ Python tracker

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401 pull_request: https://github.com/python/cpython/pull/24619 ___ Python tracker

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5a4aa4c03e27ca5007b86c9c1ee62c77ad08a120 by Inada Naoki in branch 'master': bpo-23882: Doc: Clarify unittest discovery document (GH-21560) https://github.com/python/cpython/commit/5a4aa4c03e27ca5007b86c9c1ee62c77ad08a120 --

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-20 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20706 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21560 ___ Python tracker ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-20 Thread Inada Naoki
Change by Inada Naoki : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: patch review -> needs patch ___ Python tracker ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-19 Thread Inada Naoki
Inada Naoki added the comment: In such case, both directories must be specified explicitly. Test discovery doesn't know that a directory is namespace package or namespace package. So it shouldn't assume it is namespace package unless specified. Note that PEP 420 searches namespace package

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-19 Thread Roger Gammans
Roger Gammans added the comment: But namespace packages are still useful for what PEP420 envisages and they should be able to have runnable tests. For instance projectX/ - interfaces/ - proxyX.py - testX.py projectY/ - intefaces/ - proxyY.py -

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-18 Thread Inada Naoki
Inada Naoki added the comment: Searching into directory without __init__.py recursively is not only inefficient, but also dangerous. project/ - mylib/ - __init__.py - foo.py - tests/ - __init__.py - test_foo.py - tools/ - bin/ -

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-18 Thread Inada Naoki
Inada Naoki added the comment: I think people misunderstanding and misusing PEP 420, withouth knowing what is namespace package for. I had wrote an article to describe namespace package is not a regular package. https://dev.to/methane/don-t-omit-init-py-3hga --

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-18 Thread Inada Naoki
Inada Naoki added the comment: I had rejected this idea in #29642. This is a copy of my comments in the issue. --- I'm afraid this change makes testloader searches unrelated directory contains massive files (like node_modules). I don't think loading all tests from whole namespace package

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-03-24 Thread Zbynek Winkler
Change by Zbynek Winkler : -- nosy: +Zbynek.Winkler ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2019-08-19 Thread Roger Gammans
Change by Roger Gammans : -- nosy: +rgammans ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-08-20 Thread Robert Collins
Robert Collins added the comment: (for the trivial case of CLI discover without a parameter - so translate that to the lower level API and then test that) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23882

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-08-20 Thread Robert Collins
Robert Collins added the comment: reviewed in rietvald, but here too just in case. The hunk that saves/restores _top_level_dir feels wrong to me - and not part of this bug, please remove it. The rest of the patch is fine today. But it also needs to add two specifically namespace tests:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-05-12 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23882 ___ ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-05-12 Thread Alex Shkop
Alex Shkop added the comment: Please, review the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23882 ___ ___ Python-bugs-list mailing

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-29 Thread Alex Shkop
Alex Shkop added the comment: Yes. That is how issue23882_find_all.patch works. I just removed hte condition if (not namespace and not os.path.isfile(os.path.join(full_path, '__init__.py'))): return None, False This makes namespace parameter redundant. Can I

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-28 Thread Robert Collins
Robert Collins added the comment: Ah the user model? I think the following: If I run 'python -m unittest' in a directory, then I expect to run all of the tests contained within that directory tree, and no others. Does that definition help? --

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-28 Thread Alex Shkop
Changes by Alex Shkop a.v.sh...@gmail.com: Added file: http://bugs.python.org/file39223/issue23882_find_one_level.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23882 ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-28 Thread Alex Shkop
Alex Shkop added the comment: I'm still not sure which solution is the best. So I attach two simple patches. First one enables full recursive scan of start_dir for namespace packages. Second one loads tests only from top level namespace packages. -- keywords: +patch Added file:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-20 Thread Robert Collins
Robert Collins added the comment: Ok, so here's whats happening: the default behaviour is to do discovery of '.', which bypasses the namespace support code. Running with tests as the first parameter works because it doesn't require the directory being directly scanned to be a package.

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-20 Thread Alex Shkop
Alex Shkop added the comment: Thanks. I understand the code pretty well and I saw issue17457 that fixes discovery for explicitly specified namespace package. What I need is to know how discovery has to work. Do we need to discover namespace packages inside discovery path? And should we do