exp init: timeout prompts' test

The `exp init` tests may just keep waiting on the prompts blocking tests.
The blocking of prompts is likely a failure in tests setup or a bug
in the implementation. It's hard to find out these failures or avoid it.
If they take longer than 1 second, they most likely have failed as
most of test takes 0.1 second at max.
This commit is contained in:
Saugat Pachhai (सौगात)
2021-11-22 03:27:16 +02:00
committed by Ruslan Kuprieiev
parent 46289182d2
commit bf313d92aa
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -127,6 +127,7 @@ tests =
pytest-docker==0.10.3; python_version < '3.10' or sys_platform != 'win32'
flaky==3.7.0
mock==4.0.3
pytest-timeout==2.0.1
rangehttpserver==1.2.0
mock-ssh-server==0.9.1
wget==3.2
+3
View File
@@ -9,6 +9,9 @@ from dvc.main import main
from dvc.repo.experiments.init import init
from dvc.stage.exceptions import DuplicateStageName
# the tests may hang on prompts on failure
pytestmark = pytest.mark.timeout(1)
def test_init_simple(tmp_dir, scm, dvc, capsys):
tmp_dir.gen(