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

DM-24355: make visit definition and instrument registration idempotent. #312

Merged
merged 3 commits into from Oct 16, 2020

Conversation

TallJimbo
Copy link
Member

No description provided.

@@ -103,6 +103,9 @@ def test_register(self):
registeredInstrument = Instrument.fromName(self.instrument.getName(), registry)
self.assertEqual(type(registeredInstrument), type(self.instrument))

# Check that re-registration is not an error.
self.instrument.register(registry)
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

It does indeed. Done.

It is now safe to attempt to define the same visit twice, as long as
the definitions actually are the same.
Mostly, just document and test that it should be; it's really up to
subclasses to follow through.
@TallJimbo TallJimbo merged commit 47b63df into master Oct 16, 2020
@TallJimbo TallJimbo deleted the tickets/DM-24355 branch October 16, 2020 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants