-
Notifications
You must be signed in to change notification settings - Fork 801
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
Cleaning up name before appending unit on name #543
Conversation
@@ -527,6 +527,11 @@ def test_no_units_for_info_enum(self): | |||
self.assertRaises(ValueError, Info, 'foo', 'help', unit="x") | |||
self.assertRaises(ValueError, Enum, 'foo', 'help', unit="x") | |||
|
|||
def test_name_cleanup_before_unit_append(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add a test that this is exposed correctly somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added on tests/test_asgi.py and tests/test_wsgi.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are additional handlers, text_exposition would be the best place to put it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
695e1bd
to
644d4cf
Compare
Signed-off-by: Amim Knabben <amim.knabben@gmail.com>
Thanks! |
Hello, is this change intended?
I was looking at it with the following: |
Unit append in the name were being removed when _total exists. This moves the clean up before appending the unit.
Refs #542
@brian-brazil Should this "repeated" unit raise an ValueError exception instead since this suffix is already append when dumping on WSGI.