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

Change --junit-xml=path to accept directories or change help text. #2089

Closed
decentral1se opened this issue Nov 26, 2016 · 2 comments
Closed

Comments

@decentral1se
Copy link
Contributor

I was working on #595 and ran into this.

When running:

$ pytest --junit-xml=.

I receive a IsADirectoryError: [Errno 21] error.

What I need to pass to make this work is:

$ pytest --junit-xml=somefile

Could --junit-xml=. default to create some report file?

Otherwise, should the help text be altered to highlight that it must be a file name?

@nicoddemus
Copy link
Member

nicoddemus commented Nov 26, 2016

I think we should warn the user that the option must be a filename and not an existing directory, similar that what was done in #2080.

The check would have to reside somewhere in junitxml.py thought... I wonder if argparse doesn't support some validation mechanism for this instead?

@decentral1se
Copy link
Contributor Author

decentral1se commented Nov 28, 2016

I wonder if argparse doesn't support some validation mechanism for this instead?

Well, it seems that argparse gives us a type kwarg.

Check the diff in #2097, if it isn't acceptable, I can add the specific warning.

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

No branches or pull requests

2 participants