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

Check interface implementations for correct argument names #61

Open
ghost opened this issue Apr 16, 2014 · 1 comment
Open

Check interface implementations for correct argument names #61

ghost opened this issue Apr 16, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 16, 2014

For example, FilePath.child, IFilePath.child and ZipFile.child use different argument names, which means that you can't be certain that it is safe to call the child method with keyword arguments.

Maybe it would also be a good idea for twistedchecker to automatically to zope.interface.verify.verifyClass tests, except that would require actually importing the module.


Imported from Launchpad using lp2gh.

@adiroiban
Copy link
Member

I am not sure if this is the right place to do this check.
It would need to import the module and the interface... and you might have modules which are only loaded on a specific OS so you would need to run the checker on multiple operating systems

For my project, for each class I have a test_initialization unit test, in which I check for interface implementation using a test helper.

Maybe we can update the Twisted reviewer's check list and add a note that for new classes we need a test against interface implementation.

@wallrj please add your feedback on this.

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

No branches or pull requests

1 participant