I’m finding that `--test-output=all` is still only...
# general
r
I’m finding that
--test-output=all
is still only giving me the stdout from the test that fails… is there something that I could be doing wrong here? Also is it true that both
--test-output=all
and
--output=all
do the same thing?
1
👀 1
I get more output as a result of enabling
--test-output=all
from the successful tests, but on the failed test I see
captured stdout setup
`captured stdout call`and `captured stdout teardown`and I’d really like to see this for the successful tests as well (in order to diagnose a race condition that is dependent upon the order in which tests are run
c
Also is it true that both
--test-output=all
and
--output=all
do the same thing?
Yes, when provided after the
test
goal on the command line, it is.
b
@rapid-exabyte-76685 I think you might need to specify the pytest option for more info on a passed test. pytest --help should list it
r
maybe combined with
-- -s
?
h
what's the full command you're running?
r
./pants --process-execution-local-parallelism=1 test --force path/to/tests:integration_tests -- -m "integration"
and adding
-s
doesn’t seem to help… if I happen to get a run where all my tests pass I’m not seeing anything other than…
Copy code
hh:mm:ss.sss [INFO] Completed: Run pytest - path/to/test/test_file_a.py:integration_tests succeeded.
<etc etc etc>

✓ path/to/test/test_file_a.py:integration_tests succeeded in x.yys.
I’ve decorated my various fixtures with
print(f"The value is {value}")
statements to try and get some further insight on what order things are happening in but no output is appearing.
h
if you do
./pants test --debug path/to/tests:integration_tests -- -m integration
, what happens? That runs tests sequentially and in the foreground rather than background, so you see all output
r
Running that with
-s
at the end helps 👍
And seems to consistently run the test modules in alphabetical order perhaps?
h
And seems to consistently run the test modules in alphabetical order perhaps?
That, I have zero idea. That's Pytest behavior outside of Pants's purview
r
But I thought that each module was being run as a separate pytest instance by Pants?
h
ah yeah sorry, brain fart on "module"