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

lib: remove exclamation marks #8713

Closed
wants to merge 1 commit into from
Closed

lib: remove exclamation marks #8713

wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Apr 15, 2022

... from infof() and failf() calls. Make them less attention seeking.

@bagder bagder added the tidy-up label Apr 15, 2022
... from infof() and failf() calls. Make them less attention seeking.

Closes #8713
@bagder bagder force-pushed the bagder/no-exclamations branch from 2692b01 to 0c820f6 Compare Apr 15, 2022
Copy link
Member

@danielgustafsson danielgustafsson left a comment

How about this one in lib/vquic/ngtcp2.c?:

H3BUGF(infof(data, "!!!!!!!!! cb_h3_readfunction sets EOF"));

It is a debug output, but unless the exclamation marks means something I think it can be improved.

@bagder
Copy link
Member Author

@bagder bagder commented Apr 16, 2022

Indeed. I'll remove them from there.

@bagder bagder deleted the bagder/no-exclamations branch Apr 16, 2022
@kdudka
Copy link
Collaborator

@kdudka kdudka commented Apr 28, 2022

This change broke pycurl's test-suite:

=================================== FAILURES ===================================
_____________________ ErrorTest.test_pycurl_error_libcurl ______________________
self = <tests.error_test.ErrorTest testMethod=test_pycurl_error_libcurl>
    def test_pycurl_error_libcurl(self):
        try:
            # perform without a url
>           self.curl.perform()
E           pycurl.error: (3, 'No URL set')
tests/error_test.py:20: error
During handling of the above exception, another exception occurred:
self = <tests.error_test.ErrorTest testMethod=test_pycurl_error_libcurl>
    def test_pycurl_error_libcurl(self):
        try:
            # perform without a url
            self.curl.perform()
        except pycurl.error:
            exc_type, exc = sys.exc_info()[:2]
            assert exc_type == pycurl.error
            # pycurl.error's arguments are libcurl errno and message
            self.assertEqual(2, len(exc.args))
            self.assertEqual(int, type(exc.args[0]))
            self.assertEqual(str, type(exc.args[1]))
            # unpack
            err, msg = exc.args
            self.assertEqual(pycurl.E_URL_MALFORMAT, err)
            # possibly fragile
>           self.assertEqual('No URL set!', msg)
E           AssertionError: 'No URL set!' != 'No URL set'
E           - No URL set!
E           ?           -
E           + No URL set
tests/error_test.py:32: AssertionError
______________________ ErrorTest.test_pycurl_errstr_type _______________________
self = <tests.error_test.ErrorTest testMethod=test_pycurl_errstr_type>
    def test_pycurl_errstr_type(self):
        self.assertEqual('', self.curl.errstr())
        try:
            # perform without a url
>           self.curl.perform()
E           pycurl.error: (3, 'No URL set')
tests/error_test.py:43: error
During handling of the above exception, another exception occurred:
self = <tests.error_test.ErrorTest testMethod=test_pycurl_errstr_type>
    def test_pycurl_errstr_type(self):
        self.assertEqual('', self.curl.errstr())
        try:
            # perform without a url
            self.curl.perform()
        except pycurl.error:
            # might be fragile
>           self.assertEqual('No URL set!', self.curl.errstr())
E           AssertionError: 'No URL set!' != 'No URL set'
E           - No URL set!
E           ?           -
E           + No URL set
tests/error_test.py:46: AssertionError

@jzakrzewski
Copy link
Contributor

@jzakrzewski jzakrzewski commented Apr 28, 2022

I'm sorry, but who tests human-readable error messages from the 3-party code?
That makes no sense and the comments in those tests confirm that the author knew it may break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants