From 5837a6872e1c07423ff803132383a0e31fb245e9 Mon Sep 17 00:00:00 2001 From: Eva Lott Date: Wed, 27 Nov 2024 16:43:55 +0000 Subject: [PATCH] ignored tango deprecation warning This will be handled seperately in https://github.com/bluesky/ophyd-async/issues/681. --- panda_connect.py | 29 ----------------------------- pyproject.toml | 8 ++++++-- 2 files changed, 6 insertions(+), 31 deletions(-) delete mode 100644 panda_connect.py diff --git a/panda_connect.py b/panda_connect.py deleted file mode 100644 index 7e80a189a..000000000 --- a/panda_connect.py +++ /dev/null @@ -1,29 +0,0 @@ -import asyncio -from pathlib import Path - -import numpy as np - -from ophyd_async.core import StaticFilenameProvider, StaticPathProvider -from ophyd_async.fastcs.panda import HDFPanda, SeqTable - - -async def get_panda(): - panda = HDFPanda( - "PANDA1:", StaticPathProvider(StaticFilenameProvider("test-panda"), Path(".")) - ) - await panda.connect() - assert isinstance(panda, HDFPanda) - table = await panda.seq[1].table.get_value() - assert isinstance(table, SeqTable) - print("OUTA1", table.outa1) - outa2 = table.outa2 - position = table.position - assert isinstance(outa2, np.ndarray) and outa2.dtype == np.bool_, outa2.dtype - assert ( - isinstance(position, np.ndarray) and position.dtype == np.int32 - ), position.dtype - - return panda - - -asyncio.run(get_panda()) diff --git a/pyproject.toml b/pyproject.toml index 9246ec9ba..0b71859b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,8 +99,12 @@ addopts = """ --doctest-glob="*.rst" --doctest-glob="*.md" --ignore=docs/examples --ignore=src/ophyd_async/epics/signal.py """ -# https://iscinumpy.gitlab.io/post/bound-version-constraints/#watch-for-warnings -filterwarnings = "error" +# "error" for https://iscinumpy.gitlab.io/post/bound-version-constraints/#watch-for-warnings +# "tango" for https://github.com/bluesky/ophyd-async/issues/681 +filterwarnings = """ +error +ignore::DeprecationWarning:tango.asyncio_executor: +""" # Doctest python code in docs, python code in src docstrings, test functions in tests testpaths = "docs src tests" log_format = "%(asctime)s,%(msecs)03d %(levelname)s (%(threadName)s) %(message)s"