Code Monkey home page Code Monkey logo

Comments (4)

samuelcolvin avatar samuelcolvin commented on August 28, 2024

Looks like just some logging paths differ. PR welcome to use regexes to avoid these failures.

from watchfiles.

kloczek avatar kloczek commented on August 28, 2024

To form PR it is necessary to know the code .. which I don't know.

from watchfiles.

kloczek avatar kloczek commented on August 28, 2024

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 ===================

from watchfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.