Open kloczek opened 3 years ago
Looks like there's some socket that's not getting closed properly, and it's causing spurious failures in the test suite. Not really anything to worry about, but we should still fix it.
pytest-trio currently pins pytest to 6.1.2, and the pytest exception looks like it's a recent one, which is probably why the test suite is failing with pytest 6.2.4.
pytest-trio currently pins pytest to 6.1.2, and the pytest exception looks like it's a recent one, which is probably why the test suite is failing with pytest 6.2.4.
I can confirm that I'm using pytest 6.2.4.
Any updates for latest pytest? :P (just asking :) )
Hi, any updates on this?
@jgarte Yes, latest pytest is supported in 0.8.0.
@kloczek We don't support running our tests outside of our ci.sh script.
Closing.
Just tested 0.8.0 and pytests is now failing on collecting units
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-trio-0.8.0-4.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-trio-0.8.0-4.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-trio-0.8.0/.hypothesis/examples')
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-trio-0.8.0
configfile: pytest.ini
plugins: trio-0.8.0, mypy-0.10.3, black-0.3.12, flake8-1.1.1, checkdocs-2.10.1, enabler-2.3.1, cov-4.1.0, hypothesis-6.84.3
collected 0 items / 1 error
/usr/lib64/python3.8/site-packages/coverage/control.py:883: CoverageWarning: No data was collected. (no-data-collected)
self._warn("No data was collected.", slug="no-data-collected")
========================================================================================== ERRORS ===========================================================================================
_______________________________________________________________________________ ERROR collecting test session _______________________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/nodes.py:141: in _create
return super().__call__(*k, **kw)
E TypeError: __init__() got an unexpected keyword argument 'path'
During handling of the above exception, another exception occurred:
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in from_call
result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:372: in <lambda>
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/main.py:717: in collect
col = self._collectfile(pkginit, handle_dupes=False)
/usr/lib/python3.8/site-packages/_pytest/main.py:602: in _collectfile
return ihook.pytest_collect_file(file_path=fspath, parent=self) # type: ignore[no-any-return]
/usr/lib/python3.8/site-packages/_pytest/config/compat.py:66: in fixed_hook
return hook(**kw)
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.8/site-packages/pytest_black.py:27: in pytest_collect_file
return BlackItem.from_parent(parent, fspath=path)
/usr/lib/python3.8/site-packages/_pytest/nodes.py:649: in from_parent
return super().from_parent(parent=parent, fspath=fspath, path=path, **kw)
/usr/lib/python3.8/site-packages/_pytest/nodes.py:264: in from_parent
return cls._create(parent=parent, **kw)
/usr/lib/python3.8/site-packages/_pytest/nodes.py:156: in _create
return super().__call__(*k, **known_kw)
/usr/lib/python3.8/site-packages/pytest_black.py:47: in __init__
super(BlackItem, self).__init__(fspath, parent)
/usr/lib/python3.8/site-packages/_pytest/nodes.py:702: in __init__
self._check_item_and_collector_diamond_inheritance()
/usr/lib/python3.8/site-packages/_pytest/nodes.py:724: in _check_item_and_collector_diamond_inheritance
warnings.warn(
E pytest.PytestWarning: BlackItem is an Item subclass and should not be a collector, however its bases File are collectors.
E Please split the Collectors and the Item into separate node types.
E Pytest Doc example: https://docs.pytest.org/en/latest/example/nonpython.html
E example pull request on a plugin: https://github.com/asmeurer/pytest-flakes/pull/40/
===================================================================================== warnings summary ======================================================================================
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:147
/usr/lib/python3.8/site-packages/_pytest/nodes.py:147: PytestDeprecationWarning: <class 'pytest_black.BlackItem'> is not using a cooperative constructor and only takes {'parent', 'fspath'}.
See https://docs.pytest.org/en/stable/deprecations.html#constructors-of-custom-pytest-node-subclasses-should-take-kwargs for more details.
warnings.warn(
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:264
/usr/lib/python3.8/site-packages/_pytest/nodes.py:264: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to BlackItem is deprecated. Please use the (path: pathlib.Path) argument instead.
See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
return cls._create(parent=parent, **kw)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---------- coverage: platform linux, python 3.8.18-final-0 -----------
Name Stmts Miss Cover
-----------------------------------------------------------------------
pytest_trio/__init__.py 3 3 0.0%
pytest_trio/_tests/__init__.py 0 0 100.0%
pytest_trio/_tests/conftest.py 1 1 0.0%
pytest_trio/_tests/helpers.py 8 8 0.0%
pytest_trio/_tests/test_async_fixture.py 22 22 0.0%
pytest_trio/_tests/test_async_yield_fixture.py 29 29 0.0%
pytest_trio/_tests/test_basic.py 18 18 0.0%
pytest_trio/_tests/test_clock_fixture.py 10 10 0.0%
pytest_trio/_tests/test_contextvars.py 26 26 0.0%
pytest_trio/_tests/test_fixture_mistakes.py 41 41 0.0%
pytest_trio/_tests/test_fixture_names.py 12 12 0.0%
pytest_trio/_tests/test_fixture_nursery.py 15 15 0.0%
pytest_trio/_tests/test_fixture_ordering.py 33 33 0.0%
pytest_trio/_tests/test_hypothesis_interaction.py 34 34 0.0%
pytest_trio/_tests/test_sync_fixture.py 20 20 0.0%
pytest_trio/_tests/test_trio_mode.py 53 53 0.0%
pytest_trio/_version.py 1 1 0.0%
pytest_trio/enable_trio_mode.py 6 6 0.0%
pytest_trio/plugin.py 255 255 0.0%
-----------------------------------------------------------------------
TOTAL 587 587 0.0%
================================================================================== short test summary info ==================================================================================
ERROR - pytest.PytestWarning: BlackItem is an Item subclass and should not be a collector, however its bases File are collectors.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================== 2 warnings, 1 error in 0.39s ================================================================================
I'll reopen this ticket as issue seems still is not resolved
I'm trying to package your module as rpm packag. So I'm using typical in such case build, install and test cycle used on building package from non-root account:
May I ask for help because few units are failing: