https://pantsbuild.org/ logo
#general
Title
# general
e

early-needle-54791

01/09/2020, 7:07 PM
How do I disable timeouts in pants when running pytest. I’m trying to use pdb inside a test. neither
--timeout
or
--test-pytest-timeouts=False
seems to help
a

aloof-angle-91616

01/09/2020, 7:07 PM
it’s
--timeout-default
and you can set it to 0 to turn it off
e

early-needle-54791

01/09/2020, 7:08 PM
thanks
a

aloof-angle-91616

01/09/2020, 7:08 PM
this is one case where i wanted to expand the option name fuzzy matching since it doesn’t catch it if you just type out “timeout” or something
w

witty-crayon-22786

01/09/2020, 7:08 PM
--[no-]test-pytest-timeouts
should have worked. sounds like a bug
what did the full invoke look like?
e

early-needle-54791

01/09/2020, 7:09 PM
./pants --timeout=100000000 test --pytest-timeouts=False tests/python/pants_test/backend/jvm/tasks/jvm_compile:jvm_compile -- -k test_modulized_targets_not_compiled_for_export_classpath -s
a

aloof-angle-91616

01/09/2020, 7:09 PM
the way i solved this was
./pants options | grep -iE 'pytest.*timeout'
hm, that’s interesting
h

hundreds-father-404

01/09/2020, 7:11 PM
For V2:
./pants --no-pytest-timeouts
. For V1,
./pants --no-test-pytest-timeouts
(I have a TODO to unify V1 to use
--no-pytest-timeouts
and to deprecate the old task-based options)
w

witty-crayon-22786

01/09/2020, 7:11 PM
... oh, yikes. are those option scopes overlapping?
e

early-needle-54791

01/09/2020, 7:13 PM
okay it seems like explicitly using --test-pytest-timeouts=False has fixed it in V1, as opposed to relying on the test scope.
👍 1
h

hundreds-father-404

01/09/2020, 7:13 PM
Currently, yes Stu they both exist and aren’t wired to each other
a

aloof-angle-91616

01/09/2020, 7:14 PM
thanks for reporting back @early-needle-54791
w

witty-crayon-22786

01/09/2020, 7:17 PM
the issue in this case is actually exactly with short form options... the short form option ends up being consumed by the subsystem
or... actually, maybe that form was never legal
ie, either it needed to be
--test-pytest-timeouts
or
--timeouts
, but nothing in between
6 Views