diff --git a/poetry.lock b/poetry.lock index 494ccfe9ca59..baf9d94e217b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1980,6 +1980,17 @@ aiohttp = ">=3.6.2,<4.0.0" async_generator = ">=1.10,<2.0" pytest = ">=5.2,<6.0" +[[package]] +category = "dev" +description = "py.test plugin to abort hanging tests" +name = "pytest-timeout" +optional = false +python-versions = "*" +version = "1.4.2" + +[package.dependencies] +pytest = ">=3.6.0" + [[package]] category = "dev" description = "pytest xdist plugin for distributed testing and loop-on-failing modes" @@ -3073,7 +3084,7 @@ spacy = ["spacy"] transformers = ["transformers"] [metadata] -content-hash = "24d096168f11e5ba8d004849e082468504c99ce3c98560e80289185b493c3a59" +content-hash = "2040a142227e55989b2b715620530fad8c600956ac0bd4e260b97eaa85ab53ec" python-versions = ">=3.6,<3.9" [metadata.files] @@ -4170,6 +4181,10 @@ pytest-sanic = [ {file = "pytest-sanic-1.6.1.tar.gz", hash = "sha256:99e02c28cfa18a0a9af0cd151dddf0eca373279b9bac808733746f7ed7030ecc"}, {file = "pytest_sanic-1.6.1-py3-none-any.whl", hash = "sha256:f258c7e34818d316ff75882f865a8b08714c732461fad2d54fbe7bc7c266e6c7"}, ] +pytest-timeout = [ + {file = "pytest-timeout-1.4.2.tar.gz", hash = "sha256:20b3113cf6e4e80ce2d403b6fb56e9e1b871b510259206d40ff8d609f48bda76"}, + {file = "pytest_timeout-1.4.2-py2.py3-none-any.whl", hash = "sha256:541d7aa19b9a6b4e475c759fd6073ef43d7cdc9a92d95644c260076eb257a063"}, +] pytest-xdist = [ {file = "pytest-xdist-1.34.0.tar.gz", hash = "sha256:340e8e83e2a4c0d861bdd8d05c5d7b7143f6eea0aba902997db15c2a86be04ee"}, {file = "pytest_xdist-1.34.0-py2.py3-none-any.whl", hash = "sha256:ba5d10729372d65df3ac150872f9df5d2ed004a3b0d499cc0164aafedd8c7b66"}, diff --git a/pyproject.toml b/pyproject.toml index 2beda6eec365..10178b06e2c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -150,6 +150,7 @@ towncrier = "^19.2.0" toml = "^0.10.0" pep440-version-utils = "^0.3.0" pydoc-markdown = "^3.5.0" +pytest-timeout = "^1.4.2" [tool.poetry.extras] spacy = [ "spacy",] diff --git a/pytest.ini b/pytest.ini index e47eeb507662..66fcd8930c00 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,5 @@ [pytest] markers = skip_on_windows: mark a test as a test that shouldn't be executed on Windows. +# see https://pypi.org/project/pytest-timeout/ +timeout = 60