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
Fix the --browser option #504
Conversation
The problem was that webbrowser.open expects a URI and doesn't work with relative local paths. Solution: use pathlib to convert reporter.output_path to a URI using pathlib.Path(reporter.output_path).resolve().as_uri().
@Stannislav your pull request is missing a changelog! |
@Stannislav it works for me on macOS ⭐️ thanks for the fix! Just one detail, would you mind adding a changelog entry, please?
|
@camilamaia great! I could not test this since I am on Linux. I did leave a text on the contribution channel on discord for anyone who can test this out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⭐
@Stannislav the PR just needs a changelog entry. Rest is good to go. 🚀
Codecov Report
@@ Coverage Diff @@
## main #504 +/- ##
=======================================
Coverage 96.94% 96.94%
=======================================
Files 22 22
Lines 720 720
=======================================
Hits 698 698
Misses 22 22
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌟
@camilamaia @Pradhvan changelog updated in 7827ef4 For some reason I thought the bug was introduced in the same version :) |
* Fix the --browser option The problem was that webbrowser.open expects a URI and doesn't work with relative local paths. Solution: use pathlib to convert reporter.output_path to a URI using pathlib.Path(reporter.output_path).resolve().as_uri(). * Add a changelog entry
Description
The problem was that webbrowser.open expects a URI and doesn't
work with relative local paths.
Solution: use
pathlib
to convertreporter.output_path
to a URIusing
pathlib.Path(reporter.output_path).resolve().as_uri()
.Motivation behind this PR?
See #503
What type of change is this?
Bug fix.
Checklist
Issue
Closes #503