#136415 Report by node gh-actions covering 2126 tests from 61 modules resulted into 46 errors
Report
- ObsPy version
- 1.4.0.post0+319.g1c36adff1f
- GitHub Pull Request
- https://github.com/obspy/obspy/pull/3372
- Report file
- JSON document
- Total runtime
- 322.3 sec
- Report date/time
- Nov. 27, 2023, 5:35 a.m.
System / Python
- Architecture
- 64bit
- Machine
- x86_64
- Node
- gh-actions
- Processor
- x86_64
- Python Compiler
- GCC 12.3.0
- Python Implementation
- CPython
- Python Version
- 3.12.0
- Release
- 6.2.0-1016-azure
- System
- Linux
- Version
- #16~22.04.1-Ubuntu SMP Tue Oct 10 17:11:51 UTC 2023
Dependencies
- cartopy
- 0.22.0
- decorator
- 5.1.1
- flake8
- ---
- geographiclib
- 2.0
- lxml
- 4.9.3
- matplotlib
- 3.8.2
- numpy
- 1.26.2
- obspy
- 1.4.0.post0+319.g1c36adff1f
- pyproj
- 3.6.1
- pytest
- 7.4.3
- pytest-json-report
- 1.5.0
- requests
- 2.31.0
- scipy
- 1.11.4
- setuptools
- 68.2.2
- shapefile
- ---
- sqlalchemy
- 1.4.49
Modules (61)
Module | Errors / Failures | Tracebacks | ||||
---|---|---|---|---|---|---|
obspy.clients.earthworm | Not tested | - | - | - | - | - |
obspy.clients.fdsn | - | 8 | 8 | - | 0.03s | - |
obspy.clients.filesystem | - | 29 | 29 | - | 3.77s | - |
obspy.clients.iris | Not tested | - | - | - | - | - |
obspy.clients.neic | Not tested | - | - | - | - | - |
obspy.clients.nrl | - | 16 | 16 | - | 1.53s | - |
obspy.clients.seedlink | - | 2 | 2 | - | 0.01s | - |
obspy.clients.syngine | Not tested | - | - | - | - | - |
obspy.core | 4 | 599 | 598 | 1 | 43.89s | 1 2 3 4 |
obspy.core.event | - | 18 | 18 | - | 0.26s | - |
obspy.core.inventory | - | 23 | 23 | - | 1.65s | - |
obspy.core.util | - | 23 | 20 | 3 | 0.16s | - |
obspy.geodetics | - | 21 | 20 | 1 | 80.50s | - |
obspy.imaging | 1 | 92 | 91 | 1 | 29.11s | 5 |
obspy.io.ah | 1 | 11 | 11 | - | 0.13s | 6 |
obspy.io.alsep | 3 | 16 | 16 | - | 2.19s | 7 8 9 |
obspy.io.arclink | - | 5 | 5 | - | 5.87s | - |
obspy.io.ascii | - | 28 | 26 | 2 | 0.18s | - |
obspy.io.cmtsolution | - | 10 | 10 | - | 0.08s | - |
obspy.io.cnv | - | 1 | 1 | - | 0.02s | - |
obspy.io.css | - | 10 | 10 | - | 0.23s | - |
obspy.io.csv | - | 17 | 17 | - | 0.96s | - |
obspy.io.cybershake | 2 | 3 | 3 | - | 0.02s | 10 11 |
obspy.io.dmx | 4 | 5 | 5 | - | 0.04s | 12 13 14 15 |
obspy.io.focmec | - | 8 | 8 | - | 0.14s | - |
obspy.io.gcf | 7 | 14 | 13 | 1 | 0.24s | 16 17 18 19 20 21 22 |
obspy.io.gse2 | - | 55 | 55 | - | 0.66s | - |
obspy.io.hypodd | - | 9 | 9 | - | 0.20s | - |
obspy.io.iaspei | - | 7 | 7 | - | 0.89s | - |
obspy.io.json | - | 4 | 4 | - | 0.04s | - |
obspy.io.kinemetrics | 3 | 8 | 8 | - | 0.57s | 23 24 25 |
obspy.io.kml | - | 3 | 3 | - | 0.17s | - |
obspy.io.mseed | - | 128 | 128 | - | 2.73s | - |
obspy.io.ndk | - | 20 | 20 | - | 0.64s | - |
obspy.io.nied | - | 11 | 11 | - | 0.10s | - |
obspy.io.nlloc | - | 15 | 15 | - | 0.58s | - |
obspy.io.nordic | - | 60 | 58 | 2 | 2.23s | - |
obspy.io.pdas | 1 | 3 | 3 | - | 0.02s | 26 |
obspy.io.pde | - | 13 | 12 | 1 | 1.07s | - |
obspy.io.quakeml | - | 38 | 37 | 1 | 0.43s | - |
obspy.io.reftek | 2 | 21 | 21 | - | 0.26s | 27 28 |
obspy.io.rg16 | 2 | 38 | 38 | - | 0.21s | 29 30 |
obspy.io.sac | - | 99 | 99 | - | 0.80s | - |
obspy.io.scardec | - | 5 | 5 | - | 0.09s | - |
obspy.io.seg2 | 2 | 2 | 2 | - | 0.01s | 31 32 |
obspy.io.segy | 6 | 56 | 56 | - | 0.50s | 33 34 35 36 37 38 |
obspy.io.seisan | - | 8 | 7 | 1 | 0.10s | - |
obspy.io.seiscomp | - | 49 | 49 | - | 1.43s | - |
obspy.io.sh | - | 26 | 24 | 2 | 0.70s | - |
obspy.io.shapefile | - | 7 | 7 | - | 0.57s | - |
obspy.io.stationtxt | - | 11 | 11 | - | 0.12s | - |
obspy.io.stationxml | - | 24 | 24 | - | 0.56s | - |
obspy.io.wav | 6 | 8 | 7 | 1 | 0.05s | 39 40 41 42 43 44 |
obspy.io.win | 1 | 3 | 3 | - | 0.16s | 45 |
obspy.io.xseed | - | 83 | 83 | - | 20.93s | - |
obspy.io.y | 1 | 5 | 4 | 1 | 0.03s | 46 |
obspy.io.zmap | - | 15 | 15 | - | 0.44s | - |
obspy.realtime | - | 22 | 22 | - | 0.50s | - |
obspy.scripts | - | 2 | 2 | - | 0.01s | - |
obspy.signal | - | 233 | 231 | 2 | 33.34s | - |
obspy.taup | - | 76 | 76 | - | 57.15s | - |
Summary | 46 | 2126 | 2106 | 20 | 322.27s | 46 |
Tracebacks (46)
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-pgu86m2s.tmp' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 625, in _generic_reader generic = callback_func(pathname_or_url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/decorator.py", line 143, in uncompress_file return func(filename, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/stream.py", line 251, in _read stream, format = _read_from_plugin('waveform', filename, format=format, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gse2/core.py", line 120, in _is_gse1 with open(filename, 'rb') as f: ^^^^^^^^^^^^^^^^^^^^ TypeError: expected str, bytes or os.PathLike object, not BytesIO During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-gbt6zyo7.tmp' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-prvc2i_0.tmp' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/tests/test_waveform_plugins.py", line 263, in test_is_format if is_format(file) is True: # pragma: no cover ^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/y/tests/data/YAZRSPE.20100119.060433' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-h5g91lgh.tmp' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/ah/tests/data/ah2.f' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c6826b880> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_pse>} firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_pse>} firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_pse>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/alsep/tests/data/pse.a15.1.2.mini' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c893c5620> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_wth>} firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_wth>} firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_wth>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/alsep/tests/data/wth.1.5.mini' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c6826b880> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_wtn>} firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_wtn>} firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.alsep.core._read_wtn>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/alsep/tests/data/wtn.1.2.mini' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c682699e0> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.cybershake>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.cybershake>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.cybershake>}, firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/cybershake/tests/data/test.grm' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/cybershake/tests/data/test.grm' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c889af740> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.dmx>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.dmx>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.dmx>}, firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/dmx/tests/data/131114_090600.dmx' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/dmx/tests/data/131114_090600.dmx' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/dmx/tests/data/131114_090600.dmx' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/dmx/tests/data/131114_090600.dmx' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c6a8a6340> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.gcf>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.gcf>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.gcf>}, firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gcf/tests/data/20160603_1955n.gcf' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gcf/tests/data/20160603_1955n.gcf' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gcf/tests/data/20160603_1955n.gcf' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gcf/tests/data/20160603_1955n.gcf' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gcf/tests/data/20160603_1955n.gcf' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gcf/tests/data/20160603_1910n.gcf' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gcf/tests/data/20160603_1910n.gcf' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c6a0ab560> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.kinemetrics>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.kinemetrics>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.kinemetrics>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/kinemetrics/tests/data/BI008_MEMA-04823.evt' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/kinemetrics/tests/data/BX456_MOLA-02351.evt' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 625, in _generic_reader generic = callback_func(pathname_or_url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/decorator.py", line 143, in uncompress_file return func(filename, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/stream.py", line 251, in _read stream, format = _read_from_plugin('waveform', filename, format=format, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/gse2/core.py", line 120, in _is_gse1 with open(filename, 'rb') as f: ^^^^^^^^^^^^^^^^^^^^ TypeError: expected str, bytes or os.PathLike object, not BytesIO During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-czegaza3.tmp' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c6826a200> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.pdas.core._read_pdas>} firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.pdas.core._read_pdas>} firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.pdas.core._read_pdas>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/pdas/tests/data/p1246001.108' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c5ebbd260> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.reftek>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.reftek>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.reftek>}, firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/reftek/tests/data/225051000_00008656' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/reftek/tests/data/225051000_00008656' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c5c5391c0> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.rg16>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.rg16>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.rg16>}, firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/rg16/tests/data/three_chans_six_traces.fcnt' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/rg16/tests/data/three_chans_six_traces.fcnt' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 152, in _multicall return outcome.get_result() ^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_result.py", line 114, in get_result raise exc.with_traceback(exc.__traceback__) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 177, in pytest_runtest_call raise e File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/python.py", line 1792, in runtest self.ihook.pytest_pyfunc_call(pyfuncitem=self) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 113, in _multicall raise exception.with_traceback(exception.__traceback__) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call result = testfunction(**testargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/seg2/tests/test_seg2.py", line 92, in test_read_data_format_2 assert len(w) == 1 AssertionError: assert 3 == 1 + where 3 = len([<warnings.WarningMessage object at 0x7f3c891f6e40>, <warnings.WarningMessage object at 0x7f3c891f7ef0>, <warnings.WarningMessage object at 0x7f3c5ebb3ce0>])
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 152, in _multicall return outcome.get_result() ^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_result.py", line 114, in get_result raise exc.with_traceback(exc.__traceback__) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 177, in pytest_runtest_call raise e File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/python.py", line 1792, in runtest self.ihook.pytest_pyfunc_call(pyfuncitem=self) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 113, in _multicall raise exception.with_traceback(exception.__traceback__) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call result = testfunction(**testargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/seg2/tests/test_seg2.py", line 115, in test_read_data_format_3 assert len(w) == 2 AssertionError: assert 4 == 2 + where 4 = len([<warnings.WarningMessage object at 0x7f3c5d6282f0>, <warnings.WarningMessage object at 0x7f3c5d62b620>, <warnings.WarningMessage object at 0x7f3c5d628bc0>, <warnings.WarningMessage object at 0x7f3c5d62ba70>])
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c5d4d0c20> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.segy.core._read_segy>} firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.segy.core._read_segy>} firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.segy.core._read_segy>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/segy/tests/data/00001034.sgy_first_trace' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c8919a0c0> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.segy.core._read_su>} firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.segy.core._read_su>} firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.segy.core._read_su>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/segy/tests/data/1.su_first_trace' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-unftf68n.tmp' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/segy/tests/data/1.sgy_first_trace' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/segy/tests/data/example.y_first_trace' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/segy/tests/data/1.su_first_trace' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c8928c900> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.wav>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.wav>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.wav>}, firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/wav/tests/data/3cssan.near.8.1.RNON.wav' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c88aed940> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.wav.core._read_wav>} firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.wav.core._read_wav>} firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.wav.core._read_wav>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/wav/tests/data/3cssan.near.8.1.RNON.wav' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/wav/tests/data/3cssan.near.8.1.RNON.wav' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/wav/tests/data/3cssan.near.8.1.RNON.wav' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-w_0d13nj.tmp' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/obspy-h_eo4lwj001.tmp' mode='rt' encoding='UTF-8'>
Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() ^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/runner.py", line 262, in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/pluggy/_callers.py", line 130, in _multicall teardown[0].send(outcome) File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 88, in pytest_runtest_call yield from unraisable_exception_runtest_hook() File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 78, in unraisable_exception_runtest_hook warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> Traceback (most recent call last): File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin is_format = is_format(filename) ^^^^^^^^^^^^^^^^^^^ ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/win/tests/data/10030302.00' mode='rt' encoding='UTF-8'>
cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3c88faca40> when = 'call' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() ../_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) ../_pytest/runner.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <HookCaller 'pytest_runtest_call'> kwargs = {'item': <DoctestItem obspy.io.y.core._read_y>}, firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert ( not self.is_historic() ), "Cannot directly call a historic hook - use call_historic instead." self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False > return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) ../pluggy/_hooks.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3c77679e20> hook_name = 'pytest_runtest_call' methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] kwargs = {'item': <DoctestItem obspy.io.y.core._read_y>}, firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ../pluggy/_manager.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/share/miniconda3/envs/test/lib/python3.12/...eb9e0>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3c6c9dc620>>, ...] caller_kwargs = {'item': <DoctestItem obspy.io.y.core._read_y>} firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None only_new_style_wrappers = True try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError: for argname in hook_impl.argnames: if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) if hook_impl.hookwrapper: only_new_style_wrappers = False try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) wrapper_gen = cast(Generator[None, Result[object], None], res) next(wrapper_gen) # first yield teardowns.append((wrapper_gen,)) except StopIteration: _raise_wrapfail(wrapper_gen, "did not yield") elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: # Fast path - only new-style wrappers, no Result. if only_new_style_wrappers: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: teardown.throw(exception) # type: ignore[union-attr] else: teardown.send(result) # type: ignore[union-attr] # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() # type: ignore[union-attr] except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") # type: ignore[arg-type] if exception is not None: raise exception.with_traceback(exception.__traceback__) else: return result # Slow path - need to support old-style wrappers. else: if firstresult: # first result hooks return a single value outcome: Result[object | list[object]] = Result( results[0] if results else None, exception ) else: outcome = Result(results, exception) # run all wrapper post-yield blocks for teardown in reversed(teardowns): if isinstance(teardown, tuple): try: > teardown[0].send(outcome) ../pluggy/_callers.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(hookwrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None, None, None]: > yield from unraisable_exception_runtest_hook() ../_pytest/unraisableexception.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: yield if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> E E Traceback (most recent call last): E File "/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/core/util/base.py", line 398, in _read_from_plugin E is_format = is_format(filename) E ^^^^^^^^^^^^^^^^^^^ E ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/miniconda3/envs/test/lib/python3.12/site-packages/obspy/io/y/tests/data/YAYT_BHZ_20021223.124800' mode='rt' encoding='UTF-8'> ../_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
Skipped tests (20)
Submodule | Test | Skip message |
---|---|---|
core | core/stream.py::obspy.core.stream._is_pickle | Skipped: all tests skipped by +SKIP option |
core.util | core/util/misc.py::obspy.core.util.misc.CatchOutput | Skipped: all tests skipped by +SKIP option |
core.util | core/util/misc.py::obspy.core.util.misc.SuppressOutput | Skipped: all tests skipped by +SKIP option |
core.util | core/util/misc.py::obspy.core.util.misc.TemporaryWorkingDirectory | Skipped: all tests skipped by +SKIP option |
geodetics | geodetics/tests/test_util_geodetics.py::TestUtilGeodetics::test_gps_2_dist_azimuth_bug150 | Skipped: Geographiclib installed, not using calc_vincenty_inverse |
imaging | imaging/tests/test_mopad_script.py::TestMopad::test_script_plot | Skipped: Currently broken until further review. |
io.ascii | io/ascii/core.py::obspy.io.ascii.core._is_slist | Skipped: all tests skipped by +SKIP option |
io.ascii | io/ascii/core.py::obspy.io.ascii.core._is_tspair | Skipped: all tests skipped by +SKIP option |
io.gcf | io/gcf/core.py::obspy.io.gcf.core._write_gcf | Skipped: all tests skipped by +SKIP option |
io.nordic | io/nordic/utils.py::obspy.io.nordic.utils._evmagtonor | Skipped: all tests skipped by +SKIP option |
io.nordic | io/nordic/utils.py::obspy.io.nordic.utils._nortoevmag | Skipped: all tests skipped by +SKIP option |
io.pde | io/pde/mchedr.py::obspy.io.pde.mchedr._is_mchedr | Skipped: all tests skipped by +SKIP option |
io.quakeml | io/quakeml/core.py::obspy.io.quakeml.core._is_quakeml | Skipped: all tests skipped by +SKIP option |
io.seisan | io/seisan/core.py::obspy.io.seisan.core._is_seisan | Skipped: all tests skipped by +SKIP option |
io.sh | io/sh/core.py::obspy.io.sh.core._is_asc | Skipped: all tests skipped by +SKIP option |
io.sh | io/sh/core.py::obspy.io.sh.core._is_q | Skipped: all tests skipped by +SKIP option |
io.wav | io/wav/core.py::obspy.io.wav.core._is_wav | Skipped: all tests skipped by +SKIP option |
io.y | io/y/core.py::obspy.io.y.core._is_y | Skipped: all tests skipped by +SKIP option |
signal | signal/quality_control.py::obspy.signal.quality_control.MSEEDMetadata | Skipped: all tests skipped by +SKIP option |
signal | signal/tests/test_quality_control.py::TestQualityControl::test_schema_validation | Skipped: Test requires the jsonschema module |