-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[7.2.0rc2 regression] testpath.assert_calls
(python package) can't mock subprocess calls for deeply nested files
#22664
Comments
Two other things I forgot to mention:
|
I can't reproduce this on regular Ubuntu. Could you post the output of running with You could also bisect the failure by running Bazelisk with |
I also couldn't reproduce on macOS
|
I was able to repro and bisect, culprit is d98b02e |
cc @oquenchil |
|
@meisterT Could you share the failure with |
I can repro if I make the path of the containing package longer. Are we having long path issues on Unix now? Will investigate. |
I will send a fix to |
I sent jupyter/testpath#28. |
@fmeum Thanks for investigating! |
Wow you people are good! Thanks so much! 💚 Also, TIL about |
@dougthor42 No worry! I'm updating the bug template to make it more prominent! Thanks for the report again! |
Description of the bug:
Short-short version:
The level of nesting of a python file seems to impact whether or not the test runs successfully.
Slightly longer version:
We use the python
testpath
library to mock out subprocess calls for testing. In 7.2.0rc1, this worked just fine. In rc2, the test would fail.An attempt to reproduce the error shows that things only fail if the python code is deeply nested.
I'm sorry I didn't notice this when rc2 was first released!
Error Text:
Which category does this issue belong to?
Core, Python Rules
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I was able to recreate the issue with the following config and dir structure:
The key thing to note is that the issue doesn't happen if test_foo.py and BUILD.bazel are in
src/one/two/
or shallower, only if they're insrc/one/two/three/
or deeper.Toggle
.bazelversion
between rc1 and rc2 to see the issue.Which operating system are you running Bazel on?
gLinux
What is the output of
bazel info release
?release 7.2.0rc2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
Yes.
Things were fine in 7.2.0rc1.
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: