Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure epics/test_signals.py #630

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Restructure epics/test_signals.py #630

merged 3 commits into from
Nov 22, 2024

Conversation

jsouter
Copy link
Contributor

@jsouter jsouter commented Oct 30, 2024

closes #385

Now has a single IOC containing all the CA and PVA records, and a Device group which provides access to them.

tests/epics/signal/test_signals.py Outdated Show resolved Hide resolved
tests/epics/signal/test_signals.py Outdated Show resolved Hide resolved
tests/epics/signal/test_signals.py Outdated Show resolved Hide resolved
Comment on lines 102 to 81
async def _make_backend(typ: type | None, protocol: str, suff: str, timeout=10.0):
pv = f"{protocol}://{PV_PREFIX}:{protocol}:{suff}"
# Make and connect the backend
backend = _epics_signal_backend(typ, pv, pv)
await backend.connect(timeout=timeout)
return backend
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace this with getattr(device, suffix) in some way?

@jsouter jsouter force-pushed the signals_tests branch 2 times, most recently from f4afeb4 to d3eb221 Compare November 8, 2024 09:47
@jsouter jsouter force-pushed the signals_tests branch 2 times, most recently from 2a1b056 to a819a88 Compare November 15, 2024 11:23
@jsouter
Copy link
Contributor Author

jsouter commented Nov 15, 2024

Will update test_device_save_loader to use the the example PvaDevice class

@jsouter jsouter marked this pull request as ready for review November 15, 2024 11:39
@stan-dot
Copy link
Contributor

the only codecov complaint is testing._utils

[src/ophyd_async/epics/testing/_utils.py](https://app.codecov.io/gh/bluesky/ophyd-async/pull/630/blob/src/ophyd_async/epics/testing/_utils.py)
12
73.33%
73.33%
-

@coretl petition to exclude testing._utils from testing coverage

@coretl
Copy link
Collaborator

coretl commented Nov 19, 2024

@jsouter should I review this now or are there more changes to come?

@jsouter
Copy link
Contributor Author

jsouter commented Nov 20, 2024

@jsouter should I review this now or are there more changes to come?

I've got some more changes to push, will try and get those done soon!

move pva only records to test_records_pva.db

use ioc args to load multiple templates in epics/test_signals.py

create_ioc_fixtures in epics.testing.utils

Move example IOC and device for epics signal test to epics.testing module
@coretl coretl merged commit 1d444f4 into main Nov 22, 2024
19 of 20 checks passed
@coretl coretl deleted the signals_tests branch November 22, 2024 10:15
evalott100 pushed a commit that referenced this pull request Nov 27, 2024
* Use single IOC for both CA and PVA signals in epics/test_signals.py

move pva only records to test_records_pva.db

use ioc args to load multiple templates in epics/test_signals.py

create_ioc_fixtures in epics.testing.utils

Move example IOC and device for epics signal test to epics.testing module

* Update test_device_save_loader to use example Device from epics.testing

* Add TestingIOC class to epics.testing and example ioc helper functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructure epics/test_signals.py
3 participants