Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dev = [
"pytest-asyncio",
"pytest-forked",
"pytest-markdown-docs",
"pytest-timeout",
"ruff",
"sphinx-autobuild",
"sphinx-copybutton",
Expand Down Expand Up @@ -93,6 +94,7 @@ addopts = """
# filterwarnings = "error"
# Doctest python code in docs, python code in src docstrings, test functions in tests
testpaths = "docs src tests"
timeout = 1

[tool.coverage.run]
data_file = "/tmp/fastcs.coverage"
Expand Down
1 change: 1 addition & 0 deletions tests/test_docs_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def sim_temperature_controller():
print(process.communicate()[0])


@pytest.mark.timeout(3)
@pytest.mark.parametrize("filename", glob.glob("docs/snippets/*.py", recursive=True))
def test_snippet(filename):
runpy.run_path(filename)
2 changes: 2 additions & 0 deletions tests/transport/epics/ca/test_softioc_system.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from multiprocessing import Queue

import pytest
from p4p import Value
from p4p.client.thread import Context


@pytest.mark.timeout(3)
def test_ioc(softioc_subprocess: tuple[str, Queue]):
pv_prefix, _ = softioc_subprocess
ctxt = Context("pva")
Expand Down
5 changes: 5 additions & 0 deletions tests/transport/epics/pva/test_p4p.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@


@pytest.mark.asyncio
@pytest.mark.timeout(2)
async def test_ioc(p4p_subprocess: tuple[str, Queue]):
pv_prefix, _ = p4p_subprocess
ctxt = Context("pva")
Expand Down Expand Up @@ -74,6 +75,7 @@ async def test_ioc(p4p_subprocess: tuple[str, Queue]):


@pytest.mark.asyncio
@pytest.mark.timeout(5)
async def test_scan_method(p4p_subprocess: tuple[str, Queue]):
pv_prefix, _ = p4p_subprocess
ctxt = Context("pva")
Expand Down Expand Up @@ -113,6 +115,7 @@ async def test_scan_method(p4p_subprocess: tuple[str, Queue]):


@pytest.mark.asyncio
@pytest.mark.timeout(2)
async def test_command_method(p4p_subprocess: tuple[str, Queue]):
pv_prefix, _ = p4p_subprocess
d_values = asyncio.Queue()
Expand Down Expand Up @@ -174,6 +177,7 @@ async def test_command_method(p4p_subprocess: tuple[str, Queue]):


@pytest.mark.asyncio
@pytest.mark.timeout(2)
async def test_numerical_alarms(p4p_subprocess: tuple[str, Queue]):
pv_prefix, _ = p4p_subprocess
a_values = asyncio.Queue()
Expand Down Expand Up @@ -535,6 +539,7 @@ async def _wait_and_put_pvs():
)


@pytest.mark.timeout(4)
def test_command_method_put_twice(caplog):
class SomeController(Controller):
command_runs_for_a_while_times = []
Expand Down