Skip to content

Conversation

@shiraeeshi
Copy link

Here are some new options to support a use case mentioned in this question:
--with-inherited - allows to run inherited methods as tests
--with-undefined - allows to run methods that was not defined in the class, but was added later
--with-tools-decorators - lets istest, nottest decorators contribute to selector logic
--with-tools-decorators-only - runs only those functions and methods that was decorated with istest (a class containing a method should also be decorated)

spec/cli.py Outdated

class SpecSelector(nose.selector.Selector):
def __init__(self, *args, **kwargs):
self._with_inherited = kwargs.has_key("spec_with_inherited") and kwargs["spec_with_inherited"]
Copy link
Owner

Choose a reason for hiding this comment

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

Is there a reason these are all doing has_key + value obtain + del, and not simply self._xxx = kwargs.pop("spec_xxx", False)?

Copy link
Author

Choose a reason for hiding this comment

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

You're right, now the code is much simpler.

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.

2 participants