-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Highlight the path of file location in error report #1778
Conversation
af3b9b0
to
57704de
Compare
So that it's more obvious when we need to copy the file path.
57704de
to
4c53909
Compare
Thanks for the screenshot @nicoddemus! Shouldn't this go to |
Good point, I could rebase it tomorrow before merging though. Weird that the freeze test env is failing on Windows, it was passing just a few days ago:
Seems to be related to executing the |
That's a setuptools bug, see pypa/setuptools#702 - pypa/setuptools#703 was now merged, and seeing how often setuptools is released I bet there will be a new release very soon. |
Great, thanks for looking it up! 😁 |
Thanks for replying. Let me know if there's anything I can do to fix the failing build. |
@@ -755,14 +764,18 @@ def f(): | |||
assert tw.lines[0] == " def f():" | |||
assert tw.lines[1] == "> g(3)" | |||
assert tw.lines[2] == "" | |||
assert tw.lines[3].endswith("mod.py:5: ") |
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.
@suzaku just a question, why did you changed those tests? Your change to the terminal writer required those to be changed?
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.
@nicoddemus Yes, otherwise the tests would fail. After I used write
to print out the highlighted file path, the tests complained that there's no write
method on the TWMock
object. So I added a write
method for TWMock
and the corresponding way to check write
s.
I think there must be a better way to do this, maybe I can refactor these tests and eliminate replace TWMock
with a mock.Mock
later in another pull request?
:) |
Make it more obvious when we need to copy the file path.