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

coverage xml shouldn't bail out on parse error #396

Closed
nedbat opened this issue Aug 11, 2015 · 9 comments
Closed

coverage xml shouldn't bail out on parse error #396

nedbat opened this issue Aug 11, 2015 · 9 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Aug 11, 2015

Originally reported by Ionel Cristian Mărieș (Bitbucket: ionelmc, GitHub: ionelmc)


I have a module that has to use unsupported syntax (it's only imported if you're on the right python).

But now coverage xml fails cause of that.

$ coverage xml
Couldn't parse '/home/ionel/osp/pytest-benchmark/src/pytest_benchmark/pep418.py' as Python source: 'invalid syntax' at line 47

Can we make it a warning instead?


@nedbat
Copy link
Owner Author

nedbat commented Aug 11, 2015

The -i flag should work for you here, no?

@nedbat
Copy link
Owner Author

nedbat commented Aug 11, 2015

Original comment by Ionel Cristian Mărieș (Bitbucket: ionelmc, GitHub: ionelmc)


Doh! I don't know how I missed it

@nedbat
Copy link
Owner Author

nedbat commented Aug 11, 2015

Original comment by Ionel Cristian Mărieș (Bitbucket: ionelmc, GitHub: ionelmc)


Doooh:)

@nedbat
Copy link
Owner Author

nedbat commented Aug 11, 2015

Original comment by Ionel Cristian Mărieș (Bitbucket: ionelmc, GitHub: ionelmc)


Actually ... shouldn't it show some warnings if --ignore-errors is on?

@nedbat
Copy link
Owner Author

nedbat commented Aug 11, 2015

You mean show the same messages, but as warnings?

@nedbat
Copy link
Owner Author

nedbat commented Aug 11, 2015

Original comment by Ionel Cristian Mărieș (Bitbucket: ionelmc, GitHub: ionelmc)


Yes. A little bit of extra output doesn't hurt and helps spot potential issues.

@nedbat
Copy link
Owner Author

nedbat commented Jun 2, 2016

Original comment by Matthew Boehm (Bitbucket: mattboehm, GitHub: mattboehm)


Looking into this.

@nedbat
Copy link
Owner Author

nedbat commented Jun 2, 2016

Original comment by Matthew Boehm (Bitbucket: mattboehm, GitHub: mattboehm)


Pull request: #8

@nedbat
Copy link
Owner Author

nedbat commented Jun 2, 2016

Applied and fixed in 551dc23 (bb).

@nedbat nedbat closed this as completed Jun 2, 2016
@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant