@@ -84,8 +84,6 @@ ZeroDivisionError: division by zero
8484
8585* ✓ Test it with Python packages in COPR
8686
87- ## ToDo
88-
8987* Push it to Fedora rawhide
9088
9189 * ✓ %py_byte_compile RPM macro uses ` compileall2 ` (done in [ python-rpm-macros] ( https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/25 ) )
@@ -96,17 +94,18 @@ ZeroDivisionError: division by zero
9694* ✓ Prepare patches for upstream CPython
9795 * [ Pull request] ( https://github.com/python/cpython/pull/16012 ) merged and will be part of Python 3.9
9896
97+ * ✓ Changes from upstream CPython backported back
98+
9999## Testing
100100
101101You can test it locally with tox or unittest directly:
102102
103103``` shell
104- $ python3 -m unittest test_compileall_original.py
105- ............sss.......................sss.....................ss.................
106- ----------------------------------------------------------------------
107- Ran 81 tests in 2.137s
104+ $ python3 -m unittest test_compileall2.py
105+ ..............sss....ss.......................sss....ss.....................ss.............................----------------------------------------------------------------------
106+ Ran 107 tests in 3.714s
108107
109- OK (skipped=8 )
108+ OK (skipped=12 )
110109```
111110
112111but running in a Docker container might be better because the superuser has privileges to write to ` sys.path ` which lowers the number of skipped tests.
@@ -125,23 +124,26 @@ and run tests in it:
125124
126125``` shell
127126$ docker run --rm -it -e TOXENV=py37 -v $PWD :/src:Z -w /src compileall2
128- py37 create: /src/.tox/py37
129- py37 installdeps: pytest
130- py37 installed: atomicwrites==1.3.0,attrs==19.1.0,more-itertools==6.0.0,pluggy==0.9.0,py==1.8.0,pytest==4.3.1,six==1.12.0
131- py37 run-test-pre: PYTHONHASHSEED=' 519909491'
132- py37 runtests: commands[0] | pytest -v -s
133- ========================================== test session starts ==========================================
134- platform linux -- Python 3.7.2, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 -- /src/.tox/py37/bin/python
127+ py37 installed: atomicwrites==1.3.0,attrs==19.3.0,compileall2==0.5.0,coverage==4.5.4,importlib-metadata==0.23,more-itertools==7.2.0,packaging==19.2,pluggy==0.13.0,py==1.8.0,pyparsing==2.4.5,pytest==5.2.3,six==1.13.0,wcwidth==0.1.7,zipp==0.6.0
128+ py37 run-test-pre: PYTHONHASHSEED=' 1615314833'
129+ py37 runtests: commands[0] | coverage run --append -m py.test
130+ ==================================== test session starts =====================================
131+ platform linux -- Python 3.7.5, pytest-5.2.3, py-1.8.0, pluggy-0.13.0
135132cachedir: .tox/py37/.pytest_cache
136- rootdir: /src, inifile:
137- collected 81 items
138-
139- test_compileall_original.py::CompileallTestsWithSourceEpoch::test_compile_dir_pathlike PASSED
140- test_compileall_original.py::CompileallTestsWithSourceEpoch::test_compile_file_pathlike PASSED
141- test_compileall_original.py::CompileallTestsWithSourceEpoch::test_compile_file_pathlike_ddir PASSED
142- ... etc ...
143- ================================= 79 passed, 2 skipped in 5.15 seconds ==================================
144- ________________________________________________ summary ________________________________________________
133+ rootdir: /src
134+ collected 107 items
135+ test_compileall2.py ............ss..................................................ss [ 61%]
136+ ..............................ss......... [100%]
137+
138+ =============================== 101 passed, 6 skipped in 7.40s ===============================
139+ py37 runtests: commands[1] | coverage report -i ' --omit=.tox/*'
140+ Name Stmts Miss Cover
141+ -----------------------------------------
142+ compileall2.py 232 48 79%
143+ test_compileall2.py 621 8 99%
144+ -----------------------------------------
145+ TOTAL 853 56 93%
146+ __________________________________________ summary ___________________________________________
145147 py37: commands succeeded
146148 congratulations :)
147149```
0 commit comments