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

Remove unused resource_roundtrip() from test suite? #805

Open
padraic-shafer opened this issue Apr 14, 2024 · 2 comments
Open

Remove unused resource_roundtrip() from test suite? #805

padraic-shafer opened this issue Apr 14, 2024 · 2 comments

Comments

@padraic-shafer
Copy link
Contributor

This is not a test, and the function is not called anywhere. This dead code should probably be removed. Or could someone clarify what functionality is intended to be tested here?

def resource_roundtrip(broker_factory, RE, hw):
db = broker_factory()
db2 = broker_factory()
from ophyd.sim import NumpySeqHandler
import copy
db.prepare_hook = lambda name, doc: copy.deepcopy(dict(doc))
for spec in NumpySeqHandler.specs:
db.reg.register_handler(spec, NumpySeqHandler)
RE.subscribe(db.insert)
RE.subscribe(lambda *x: L.append(x))
uid, = get_uids(RE(count([hw.img], num=7, delay=0.1)))
for nd in db[-1].documents():
db2.insert(*nd)

@tacaswell
Copy link
Contributor

It came in via a915611 so I think it should have been named test_resource_roundtrip 🤦🏻 .

@tacaswell
Copy link
Contributor

and what I think this is testing is that the documents that come out of databroker can go back into databroker.

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

No branches or pull requests

2 participants