Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux_cuda_wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
ls
- name: Run Python tests
run: |
${CONDA_RUN} FAIL_WITHOUT_CUDA=1 pytest test -v --tb=short
${CONDA_RUN} FAIL_WITHOUT_CUDA=1 pytest --override-ini="addopts=-v" test --tb=short
- name: Run Python benchmark
run: |
${CONDA_RUN} time python benchmarks/decoders/gpu_benchmark.py --devices=cuda:0,cpu --resize_devices=none
2 changes: 1 addition & 1 deletion .github/workflows/linux_wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ jobs:
ls
- name: Run Python tests
run: |
pytest test -vvv
pytest --override-ini="addopts=-v" test
2 changes: 1 addition & 1 deletion .github/workflows/macos_wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ jobs:

- name: Run Python tests
run: |
pytest test -vvv
pytest --override-ini="addopts=-v" test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the CI continue to use maximum verbosity?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been using -v only for the CUDA tests already. Personally I find -vvv too versbose and thus difficult to debug, because the traceback is really long. Thank you for the review - I'll merge as-is, but I'm happy to put back -vvv if you prefer.

5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ pip install -e ".[dev]" --no-build-isolation -vv
To run python tests run:

```bash
pytest test -vvv
pytest
```

Tip: use the `-k "not slow"` flag to skip slow tests.
Some tests are marked as 'slow' and aren't run by default. You can use `pytest
-m slow` to run those, or `pytest -m ""` to run all tests, slow or not.

To run the C++ tests run:

Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@ target-version = ["py38"]
excludes = [
"examples",
]

[tool.pytest.ini_options]
markers = [
# defines a 'slow' mark to mark slow tests with `@pytest.mark.slow`
"slow: mark test as slow"
]

# We don't want to run the slow tests by default. These options are ignored in
# the CI, where we definitely want the 'slow' tests to run.
addopts = "-v -m 'not slow'"

testpaths = ["test"]
1 change: 1 addition & 0 deletions test/test_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ def test_iteration(self, device, seek_mode):
elif i == 389:
assert_frames_equal(ref_frame_last, frame)

@pytest.mark.slow
def test_iteration_slow(self):
decoder = VideoDecoder(NASA_VIDEO.path)
ref_frame_last = NASA_VIDEO.get_frame_data_by_index(389)
Expand Down
Loading