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
0.20.0: pytest is failing in 11 units #246
Labels
Comments
Looks like just some logging paths differ. PR welcome to use regexes to avoid these failures. |
To form PR it is necessary to know the code .. which I don't know. |
I just tested 0.21.0 and looks like now fails only one unit + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-watchfiles-0.21.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-watchfiles-0.21.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --import-mode=importlib
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/watchfiles-0.21.0
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.0.0, mock-3.12.0, timeout-2.2.0
timeout: 10.0s
timeout method: signal
timeout func_only: False
collected 161 items
tests/test_cli.py ....................... [ 14%]
tests/test_docs.py ................s [ 24%]
tests/test_filters.py .................. [ 36%]
tests/test_force_polling.py .......................... [ 52%]
tests/test_run_process.py ..s..................... [ 67%]
tests/test_rust_notify.py .................................... [ 89%]
tests/test_watch.py ...............sF [100%]
=================================== FAILURES ===================================
_________________________ test_awatch_interrupt_raise __________________________
self = <tests.test_watch.MockRustNotifyRaise object at 0x7f5f65dd28b0>
args = (1600, 50, 5000, <threading.Event object at 0x7f5f65e29130>)
def watch(self, *args):
if self.i == 1:
> raise KeyboardInterrupt('test error')
E KeyboardInterrupt: test error
tests/test_watch.py:204: KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tkloczko/rpmbuild/BUILDROOT/python-watchfiles-0.21.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages/watchfiles/main.py", line 254, in awatch
raw_changes = await anyio.to_thread.run_sync(watcher.watch, debounce, step, timeout, stop_event_)
File "/usr/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 2106, in run_sync_in_worker_thread
return await future
File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 833, in run
result = context.run(func, *args)
File "/home/tkloczko/rpmbuild/BUILD/watchfiles-0.21.0/tests/test_watch.py", line 204, in watch
raise KeyboardInterrupt('test error')
KeyboardInterrupt: test error
During handling of the above exception, another exception occurred:
+ Exception Group Traceback (most recent call last):
| File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 341, in from_call
| result: Optional[TResult] = func()
| File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 262, in <lambda>
| lambda: ihook(item=item, **kwds), when=when, reraise=reraise
| File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
| return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
| File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
| return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
| File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 152, in _multicall
| return outcome.get_result()
| File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 114, in get_result
| raise exc.with_traceback(exc.__traceback__)
| File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
| res = hook_impl.function(*args)
| File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call
| item.runtest()
| File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 1797, in runtest
| self.ihook.pytest_pyfunc_call(pyfuncitem=self)
| File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
| return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
| File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
| return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
| File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
| raise exception.with_traceback(exception.__traceback__)
| File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
| res = hook_impl.function(*args)
| File "/usr/lib/python3.8/site-packages/anyio/pytest_plugin.py", line 119, in pytest_pyfunc_call
| runner.run_test(pyfuncitem.obj, testargs)
| File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1936, in run_test
| self.get_loop().run_until_complete(
| File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
| return future.result()
| File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1896, in _call_in_runner_task
| return await future
| File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1874, in _run_tests_and_fixtures
| retval = await coro
| File "/home/tkloczko/rpmbuild/BUILD/watchfiles-0.21.0/tests/test_watch.py", line 224, in test_awatch_interrupt_raise
| async for _ in awatch('.', stop_event=stop_event):
| File "/home/tkloczko/rpmbuild/BUILDROOT/python-watchfiles-0.21.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages/watchfiles/main.py", line 259, in awatch
| tg.cancel_scope.cancel()
| File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 664, in __aexit__
| raise BaseExceptionGroup(
| exceptiongroup.BaseExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/home/tkloczko/rpmbuild/BUILDROOT/python-watchfiles-0.21.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages/watchfiles/main.py", line 254, in awatch
| raw_changes = await anyio.to_thread.run_sync(watcher.watch, debounce, step, timeout, stop_event_)
| File "/usr/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
| return await get_async_backend().run_sync_in_worker_thread(
| File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 2106, in run_sync_in_worker_thread
| return await future
| File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 833, in run
| result = context.run(func, *args)
| File "/home/tkloczko/rpmbuild/BUILD/watchfiles-0.21.0/tests/test_watch.py", line 204, in watch
| raise KeyboardInterrupt('test error')
| KeyboardInterrupt: test error
+------------------------------------
------------------------------ Captured log call -------------------------------
watchfiles.main INFO: 1 change detected
=========================== short test summary info ============================
SKIPPED [1] tests/test_docs.py:105: output varies between versions
SKIPPED [1] tests/test_run_process.py:72: no need to test this except on windows
SKIPPED [1] tests/test_watch.py:192: different on windows
FAILED tests/test_watch.py::test_awatch_interrupt_raise - exceptiongroup.Base...
=================== 1 failed, 157 passed, 3 skipped in 3.66s =================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Here is list of installed modules in build env
Example Code
Watchfiles Output
Operating System & Architecture
Environment
No response
Python & Watchfiles Version
This issue is not about installed
watchfiles
Rust & Cargo Version
cargo 1.72.0
rustc 1.72.0 (5680fa18f 2023-08-23) (Fedora 1.72.0-1.fc40)
The text was updated successfully, but these errors were encountered: