Skip to content

Commit

Permalink
Skip t01 system tests by default
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph committed Nov 29, 2024
1 parent fa890f1 commit e1960a6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ reportMissingImports = false # Ignore missing stubs in imported modules
asyncio_mode = "auto"
markers = [
"s03: marks tests as requiring the s03 simulator running (deselect with '-m \"not s03\"')",
"t01: marks tests as requiring the t01 AreaDetector simulator running (deselect with '-m \"not t01\"')",
"skip_in_pycharm: marks test as not working in pycharm testrunner",
]
addopts = """
Expand Down Expand Up @@ -150,7 +151,7 @@ allowlist_externals =
sphinx-build
sphinx-autobuild
commands =
tests: pytest -m 'not s03' --cov=dodal --cov-report term --cov-report xml:cov.xml {posargs}
tests: pytest -m 'not s03' -m 'not t01' --cov=dodal --cov-report term --cov-report xml:cov.xml {posargs}
type-checking: pyright src tests {posargs}
pre-commit: pre-commit run --all-files --show-diff-on-failure {posargs}
docs: sphinx-{posargs:build -E} -T docs build/html
Expand Down
13 changes: 11 additions & 2 deletions src/dodal/beamlines/t01.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,33 @@
)

"""
Beamline module for use with the simulated AreaDetector and motors.
These devices are simulated at the EPICS level, enabling testing of
dodal and ophyd-async against what appear to be "real" signals.
Usage Example
-------------
Start the simulated beamline by following the epics-containers tutorial at
https://epics-containers.github.io/main/tutorials/launch_example.html
And ensure that the signals are visible:
```sh
export EPICS_CA_ADDR_LIST=127.0.0.1
```
How to use the devices in a plan:
In an ipython terminal run:
```python
from bluesky.run_engine import RunEngine
from dodal.beamlines.adsim import adsim, sim_motors
from dodal.common.beamlines.beamline_utils import get_path_provider
from dodal.beamlines.t01 import adsim, sim_stage
from dodal.plans import count
RE = RunEngine()
det = adsim(connect_immediately=True)
sim_stage = sim_stage(connect_immediately=True)
RE(count([det], num=10))
```
Expand Down

0 comments on commit e1960a6

Please sign in to comment.