Message288531
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.isfile
def patched_isfile(path):
return str(path).endswith('__init__.py') or original_isfile(path)
os.path.isfile = patched_isfile
result = super()._find_test_path(full_path=full_path, pattern=pattern,
namespace=namespace)
os.path.isfile = original_isfile
return result
I'll try to submit a pull request if it can be resolved properly. |
|
Date |
User |
Action |
Args |
2017-02-24 20:17:00 | Andrei Fokau | set | recipients:
+ Andrei Fokau, barry |
2017-02-24 20:17:00 | Andrei Fokau | set | messageid: <1487967420.04.0.20803739138.issue29642@psf.upfronthosting.co.za> |
2017-02-24 20:17:00 | Andrei Fokau | link | issue29642 messages |
2017-02-24 20:16:59 | Andrei Fokau | create | |
|