Hi everyone! I'm using - python 3.9 - pants 2.14 ...
# general
p
Hi everyone! I'm using • python 3.9 • pants 2.14 • pytest 7.0.1 I want to run test without sandbox but it doesn't work:
python_tests(
name='test_func',
sources=['test_func.py'],
run_goal_use_sandbox=False
)
Result:
print(os.getcwd())
/tmp/pants-sandbox-UZihwe
Is there anything I'm doing incorrectly?
c
Hi, You’re getting the
run
goal and
test
goals mixed up. The
run_goal_use_sandbox
does not apply to testing, so there’s no escaping that.
@fresh-cat-90827 yes, the field being on a test target calls for being extra clear, so the help text could certainly be improved to make that less confusing.
👀 1
It’s a generic field, used by the
run
goal, so it’s being re-used across multiple python target types.
p
Got it! @curved-television-6568 Thank you! It would be nice to have some note that it doesn't apply to test goal. python_test(s) target is used with the test goal, so seeing the option in that docs section, that doesn't actually apply to it, is a bit confusing
❤️ 1
f
yes, thank you for sharing @proud-train-93317, I'll update the docs 🙂
❤️ 1