Skip to content

Commit

Permalink
add pytest timeout and annotate dense_image_warp test (#237)
Browse files Browse the repository at this point in the history
Co-authored-by: Marton Havasi <[email protected]>
  • Loading branch information
mhavasi and Marton Havasi authored Mar 18, 2024
1 parent 3437920 commit f207980
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ requires = [

[tool.setuptools_scm]
write_to = "neuralcompression/version.py"

[tool.pytest.ini_options]
timeout = 300
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ dev =
isort>=5.12.0
mypy>=1.5.1
pytest>=7.4.0
pytest-timeout>=2.3.1
docs =
myst-parser>=0.15.2
sphinx-autodoc-typehints>=1.12.0
Expand All @@ -99,6 +100,7 @@ tests =
opencv-python~=4.8.0.76
pillow==9.4.0
pytest==7.4.0
pytest-timeout==2.3.1
pytorchvideo==0.1.5
scipy==1.11.1
torch==2.0.1
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/test_dense_image_warp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@

import pickle

import pytest
import torch

from neuralcompression.functional import dense_image_warp


@pytest.mark.timeout(method="thread")
def test_dense_image_warp():
with open("tests/cached_data/dense_image_warp.pkl", "rb") as f:
data = pickle.load(f)
Expand Down

0 comments on commit f207980

Please sign in to comment.