Andrei Fokau added the comment:
I was wrong. The ticket can be closed now.
--
nosy: +Andrei Fokau2
___
Python tracker
<http://bugs.python.org/issue29642>
___
___
New submission from Andrei Fokau:
Hi, As far as I see, unittest.TestLoader doesn't search in PEP-420 packages,
i.e. packages without __init__.py files.
Is there some motivation behind this, or the loader was just not yet adapted
for Implicit Namespace Packages?
--
components:
Andrei Fokau added the comment:
Ok, it's actually not so hard to work around (for Python 3.6, at least):
import os
from unittest import TestLoader
class CustomTestLoader(TestLoader):
def _find_test_path(self, full_path, pattern, namespace=False):
original_isfile = os.path.i
Andrei Fokau added the comment:
Alright, I made an initial fix in #282. I believe that I still need
to update the docs and run it with something big, e.g. Django.
--
___
Python tracker
<http://bugs.python.org/issue29
Andrei Fokau added the comment:
Docs promise already support for namespace packages, so just a minor
clarification was done.
--
___
Python tracker
<http://bugs.python.org/issue29
Andrei Fokau added the comment:
Ok, testing with Django was a bad idea due to compatibility with 3.7.
I could apply it to 3.6.x and test Django with it.
Is there a better idea how to trial the test discovery?
--
___
Python tracker
<h
Andrei Fokau added the comment:
Testing with Django seems indicated an issue. I did the following with 3.6
patch (cherry-pick to bea9d2f64) on macOS with OpenSSL installed via Homebrew:
$ cd /Users/andrei/Python/cpython/
$ export CFLAGS="-I/usr/local/opt/openssl/include"
$ export L
Andrei Fokau added the comment:
Removing `--with-pydebug` parameter helped to avoid issue with _crypto
extension. Testing Django with that build produced result identical to 3.6.0:
Ran 11723 tests in 83.897s
OK (skipped=1149, expected failures=4)
The patch is ready for review