Closed kloczek closed 2 years ago
@kloczek Those tests are really not meant to be run outside of Coconut's continuous integration runs, especially since they take a lot of time to run (running the whole test suite can take almost an hour). Why do you need to run tests at install time?
It does not matter how long those test are running. I'm running test suite on buildng rpm packages.
So why those units are failing? :)
@kloczek Well, if you want to get them to succeed, you're going to have to follow the same pipeline that Coconut's continuous integration tests use, which means running make install test-all
.
Looking on what is in CI looks like you are not using pytest. Am I ringht?
BTW pytest shows some warnings
============================================================================= warnings summary =============================================================================
coconut/_pyparsing.py:97
/home/tkloczko/rpmbuild/BUILD/coconut-1.6.0/coconut/_pyparsing.py:97: UserWarning: This version of Coconut was built for pyparsing/cPyparsing versions < 2.4.8; got Python pyparsing v3.0.6 (run '/usr/bin/python3 -m pip install pyparsing<2.4.8' to fix)
warn(
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
In meantime I've moved to pep517 based build and updated many packages in my env.
Now I'm notising that coconut
test suite warns about to high versions of some modules (pyparsing/cPyparsing).
Do you have any plans to update coconut
to be able iuse it with freshen pyparsing
?
No, there are no plans to update Coconut to pyparsing>=3
. There are not really any benefits to updating Coconut to the newest pyparsing
, since Coconut should whenever possible be run on cPyparsing
rather than pyparsing
anyway.
Just tested 2.0.0 with cpyparsing
2.4.7.1.1.0 and pytest still is failing
========================================================================= short test summary info ==========================================================================
FAILED coconut/tests/constants_test.py::TestConstants::test_imports - AssertionError: Failed to import dbm.gnu
FAILED coconut/tests/main_test.py::TestShell::test_code - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestShell::test_compile_runnable - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestShell::test_convenience - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestShell::test_exit_jupyter - pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
FAILED coconut/tests/main_test.py::TestShell::test_import_hook - SystemExit: 1
FAILED coconut/tests/main_test.py::TestShell::test_import_runnable - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestShell::test_ipython_extension - FileNotFoundError: [Errno 2] No such file or directory: 'ipython'
FAILED coconut/tests/main_test.py::TestShell::test_kernel_installation - AssertionError: Return code not as expected (1 != 0) in: ['coconut', '--jupyter']
FAILED coconut/tests/main_test.py::TestShell::test_pipe - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestShell::test_runnable - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestShell::test_runnable_nowrite - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_and - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_jobs_zero - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_line_numbers - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_mypy_sys - AssertionError: MyPy error in 'coconut/tests/dest/cocotest/py3_test.py:30: error: Module "__coconut__...
FAILED coconut/tests/main_test.py::TestCompilation::test_no_tco - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_no_wrap_mypy_snip - IndexError: list index out of range
FAILED coconut/tests/main_test.py::TestCompilation::test_normal - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_package - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_run - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_simple_keep_lines - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_simple_line_numbers_keep_lines - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_simple_minify - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_standalone - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_strict - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_sys_mypy_snip - IndexError: list index out of range
FAILED coconut/tests/main_test.py::TestCompilation::test_target - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestCompilation::test_universal_mypy_snip - IndexError: list index out of range
FAILED coconut/tests/main_test.py::TestExternal::test_bbopt - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestExternal::test_prelude - AssertionError: Return code not as expected (1 != 0) in: ['/usr/bin/python3', '-m', 'coconut', '--jobs', ...
FAILED coconut/tests/main_test.py::TestExternal::test_pyprover - AssertionError: Traceback in 'Traceback (most recent call last):'
FAILED coconut/tests/main_test.py::TestExternal::test_pyston - AssertionError: Traceback in 'Traceback (most recent call last):'
================================================================= 33 failed, 3 passed in 248.90s (0:04:08) =================================================================
Yes, like I said, Coconut's tests are not meant to be run by the end user and will only succeed if you copy Coconut's testing pipeline exactly.
I'm trying to package your module as an rpm package. So I'm using the typical build, install and test cycle used on building packages from non-root account.
May I ask for help because few units are failing: