-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.1.0: pytest is failing #339
Comments
Any comment? |
i thought it's fixed! |
Just tested 4.1.0 and all looks ~good except one small detail .. test suite still is using --- a/t/integration/setup.py
+++ b/t/integration/setup.py
@@ -41,9 +41,9 @@
data_files=[],
zip_safe=False,
cmdclass={'install': no_install},
- test_suite='nose.collector',
+ test_suite='pytest',
build_requires=[
- 'nose',
+ 'pytest',
'coverage>=3.0',
],
classifiers=[
--- a/t/integration/tests/test_multiprocessing.py
+++ b/t/integration/tests/test_multiprocessing.py
@@ -15,7 +15,7 @@
import array
import random
import logging
-from nose import SkipTest
+import pytest
from test import test_support
from StringIO import StringIO
try: Feel free to commit that without waiting on PR 😋 + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-billiard-4.1.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-billiard-4.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/billiard-4.1.0, configfile: setup.cfg, testpaths: t/unit/
collected 73 items
t/unit/test_common.py ........ [ 10%]
t/unit/test_dummy.py . [ 12%]
t/unit/test_einfo.py .. [ 15%]
t/unit/test_package.py . [ 16%]
t/unit/test_pool.py ... [ 20%]
t/unit/test_spawn.py ... [ 24%]
t/unit/test_values.py .... [ 30%]
t/unit/test_win32.py sssssssssssssssssssssssssssssssssssssssssssssssssss [100%]
============================================================================= warnings summary =============================================================================
t/unit/test_spawn.py::test_spawn::test_start
/usr/lib/python3.8/site-packages/_pytest/python.py:204: PytestReturnNotNoneWarning: Expected None, but t/unit/test_spawn.py::test_spawn::test_start returned 0, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [29] t/unit/test_win32.py:13: Requires Windows to work
SKIPPED [20] t/unit/test_win32.py:47: Requires Windows to work
SKIPPED [1] t/unit/test_win32.py:72: Requires Windows to work
SKIPPED [1] t/unit/test_win32.py:76: Requires Windows to work
================================================================ 22 passed, 51 skipped, 1 warning in 3.93s ================================================================= |
ok thanks will do this week :p |
can you review it please |
what is the pytest alternative of from nose import SkipTest ? |
On sec .. will try to test that 😋
Generally speaking one of the best compendium of nose -> pytest migration IMO is https://github.com/schollii/nose2pytest/ |
OK just tested that PR. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-billiard-4.1.0-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-billiard-4.1.0-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.3.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/billiard-4.1.0
configfile: setup.cfg
testpaths: t/unit/
collected 73 items
t/unit/test_common.py ........ [ 10%]
t/unit/test_dummy.py . [ 12%]
t/unit/test_einfo.py .. [ 15%]
t/unit/test_package.py . [ 16%]
t/unit/test_pool.py ... [ 20%]
t/unit/test_spawn.py ... [ 24%]
t/unit/test_values.py .... [ 30%]
t/unit/test_win32.py sssssssssssssssssssssssssssssssssssssssssssssssssss [100%]
===================================================================================== warnings summary ======================================================================================
t/unit/test_spawn.py::test_spawn::test_start
/usr/lib/python3.8/site-packages/_pytest/python.py:203: PytestReturnNotNoneWarning: Expected None, but t/unit/test_spawn.py::test_spawn::test_start returned 0, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
SKIPPED [29] t/unit/test_win32.py:13: Requires Windows to work
SKIPPED [20] t/unit/test_win32.py:47: Requires Windows to work
SKIPPED [1] t/unit/test_win32.py:72: Requires Windows to work
SKIPPED [1] t/unit/test_win32.py:76: Requires Windows to work
========================================================================= 22 passed, 51 skipped, 1 warning in 3.67s ========================================================================= |
got it covered here #397 |
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:
The text was updated successfully, but these errors were encountered: