rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

windows pytest bug

Open ustcsq opened this issue 3 years ago • 1 comments

🐞 bug report

Affected Rule

The issue is caused by the rule: py_test()

🔬 Minimal Reproduction

debug.zip

🔥 Exception or Error


import os
print(os.getcwd())

should be C:\Users\MSI-PC_bazel_MSI-PC\27b2qbns..... but be C:\Users\MSI-PC\AppData\Local\Temp\Bazel.runfiles_hhzyym94\runfiles\smartmore_smore_xrack

企业微信截图_16557117214365

🌍 Your Environment

Operating System:

  
windows 10
  

Output of bazel version:

  
5.1.0
  

Rules_python version:

  
default
  

Anything else relevant?

ustcsq avatar Jun 20 '22 08:06 ustcsq

Can you describe the error more clearly? Tests are run in a temporary "sandbox" location, there shouldn't be any expectation of the CWD. Unless I have misunderstood the bug report?

groodt avatar Jul 03 '22 03:07 groodt

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

github-actions[bot] avatar Oct 10 '22 22:10 github-actions[bot]