Serhiy Storchaka added the comment:
> So I use "ls Lib/test/test_*codec*py", the list is quite list, it's annoying
> to have to copy/paste test names manually.
I would use
./python -m test --list | grep codec | xargs ./python -m test
--
___
STINNER Victor added the comment:
> I don't understand the use case of it ;)
When I modify a codec or something related to text codecs, I would like to run
all codec tests, not the fully Python test suite. So I use "ls
Lib/test/test_*codec*py", the list is quite list, it's annoying to have to
Roundup Robot added the comment:
New changeset a9fe5bee892b by Victor Stinner in branch 'default':
Issue #29035: Simplify a regex in libregrtest
https://hg.python.org/cpython/rev/a9fe5bee892b
--
nosy: +python-dev
___
Python tracker
Serhiy Storchaka added the comment:
> --fromfile is written for developers who understand what they do, it's
> just an helper.
I don't understand the use case of it ;) , but when you need it, the patch LGTM.
You can call just .group() instead of .group(0).
--
STINNER Victor added the comment:
Ah right, "Lib/ctypes/test/test_anon.py" doesn't work. I don't think
that it's worth to support running directly such test. I don't think
that it's worth it to modify the regex to exclude this case.
--fromfile is written for developers who understand what they
Serhiy Storchaka added the comment:
Reading file names from a file looks misleading.
$ ls Lib/ctypes/test/*.py > list
$ head list
Lib/ctypes/test/__init__.py
Lib/ctypes/test/__main__.py
Lib/ctypes/test/test_anon.py
Lib/ctypes/test/test_array_in_pointer.py
Lib/ctypes/test/test_arrays.py
STINNER Victor added the comment:
FYI initially my idea was to use a very strict to avoid false positives. But
when I used the feature, I found that the regex is more annoying than helping
(ex: I had to modify the regex to accept filenames with directories). So I now
prefer to use a very
New submission from STINNER Victor:
Lib/test/libregrtest/main.py uses a complex regex to find "test_builtin" in
lines like '0:00:00 [ 4/400] test_builtin -- test_dict took 1 sec'. Recently,
I changed (change d8222c197831) the regex to support a filename containing a
list of filenames.