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

Print inifile and rootdir when there's usage errors #822

Merged
merged 1 commit into from
Jul 11, 2015

Conversation

nicoddemus
Copy link
Member

Related to #821

@@ -669,10 +674,13 @@ def _addoption_instance(self, option, shortupper=False):


class MyOptionParser(argparse.ArgumentParser):
def __init__(self, parser):
def __init__(self, parser, extra_info={}):

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

it should indeed be "extra_info = None" on principle grounds.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, thanks

@asfaltboy
Copy link

👍 nice!

@nicoddemus
Copy link
Member Author

Removed the mutable dict from the parameter list as requested.

@nicoddemus
Copy link
Member Author

Rebased on master to account for the mock fix for py26.

nicoddemus added a commit that referenced this pull request Jul 11, 2015
Print inifile and rootdir when there's usage errors
@nicoddemus nicoddemus merged commit 1baa1a4 into pytest-dev:master Jul 11, 2015
@nicoddemus nicoddemus deleted the extra-usage-info branch July 11, 2015 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants