Nikita Sobolev <[email protected]> added the comment:
Terry, yes I am using this script to run tests locally:
```bash
#!/usr/bin/env bash
set -e
while read line; do
./python.exe "$line"
done < files.txt
```
And this one to populate `files.txt`:
```bash
find ./Lib -iname 'test*.py' -o -iname '*tests.py' -exec echo {} >> files.txt \;
```
---
There are several other problems that I have to fix manually. For example,
module-level `raise unittest.case.SkipTest()`:
```
ยป ./python.exe Lib/test/test_winreg.py
Traceback (most recent call last):
File "/Users/sobolev/Desktop/cpython/Lib/test/support/import_helper.py", line
77, in import_module
return importlib.import_module(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sobolev/Desktop/cpython/Lib/importlib/__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'winreg'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/sobolev/Desktop/cpython/Lib/test/test_winreg.py", line 11, in
<module>
import_helper.import_module('winreg', required_on=['win'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sobolev/Desktop/cpython/Lib/contextlib.py", line 155, in __exit__
self.gen.throw(typ, value, traceback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sobolev/Desktop/cpython/Lib/test/support/import_helper.py", line
26, in _ignore_deprecated_imports
yield
^^^^^
File "/Users/sobolev/Desktop/cpython/Lib/test/support/import_helper.py", line
81, in import_module
raise unittest.SkipTest(str(msg))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unittest.case.SkipTest: No module named 'winreg'
```
I am not sure what is the proper solution to this one :thinking:
Probably, I will update my script for more advanced Python-based one and ignore
this exception.
In the end, I expect to run this script without any failures. This is going to
be a great result!
---
I will also check that all possible modes `python -m test test_xyz` / `python
-m test.test_xyz` / `python Lib/test/test_xyz.py` are supported.
---
Also, thank you for listing concrete problems with my first submission. The
second one is bound to a single problem and a single submodule.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46425>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com