-
Notifications
You must be signed in to change notification settings - Fork 15
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 obsolete call of searchInterface from interfaceToName #33
Conversation
I have no problem with the substance of this change, but there should be a test failure: coveralls reports we are at 100% before this PR, which doesn't remove any tests but does remove lines that were presumably covered. @jamadden You're the one responsible for switching from |
In zopefoundation/zope.browserpage@b82f337 I use exactly the same pattern as the original issue in Plone: A browsermenu is registered with id and interface: <browser:menu
id="test_menu"
title="Test menu"
interface="zope.browserpage.tests.test_page.ITestMenu"/> When using |
Speaking of coverage, well, we don't have branch coverage enabled, do we? And it's not surprising that an assert statement that gets executed with the condition evaluating to False is marked as covered. |
Right, branch coverage is not enabled, so we just had to take both the |
@jamadden are you saying that the pattern I use above (setting up a browsermenu with id and interface) is wrong? It has been used in zope.browsermenu, I only added the failing test. |
@pbauer I wasn't commenting on zope.browserpage, only on the tests in this package. |
@mgedmin There is an actual (non-assert) branch in the removed code. How are the current tests exercising the early return? Any why don't they fail in this PR? |
The current tests exercise exactly the two cases that the code handled: one registered interface and no registered interfaces. They don't test the failure case of multiple registered interfaces (why not? Probably because that was clearly not supposed to happen, given the presence of an |
Can this be merged or is something still missing? If so, what exactly? |
Fixes #32