Skip to content

Commit 635d5eb

Browse files
committed
Reuse sampling fixture and stabilize dataset tests
1 parent a95427b commit 635d5eb

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎tests/test_dataset.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def _ingest(project: Path, monkeypatch: pytest.MonkeyPatch) -> None:
5858
assert cli_main(["ingest", "episodes-in/episode_0001.mcap"]) == 0
5959

6060

61+
@pytest.mark.usefixtures("advancing_catalog_clock")
6162
class TestDefaultPolicy:
6263
def test_a_check_that_errors_on_replay_excludes_its_episode(
6364
self, tmp_path: Path, one_second_camera_less_episode: Path

‎tests/test_source_sampling.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
pytestmark = pytest.mark.requires_system_ffmpeg
2929

3030

31-
@pytest.fixture
32-
def color_video(tmp_path: Path) -> Path:
33-
source_path = tmp_path / "colors.mp4"
31+
@pytest.fixture(scope="module")
32+
def color_video(tmp_path_factory: pytest.TempPathFactory) -> Path:
33+
source_path = tmp_path_factory.mktemp("sampling-colors") / "colors.mp4"
3434
arguments = [str(ffmpeg_path()), "-hide_banner", "-loglevel", "error", "-nostdin"]
3535
for color in ("red", "green", "blue"):
3636
arguments.extend(("-f", "lavfi", "-i", f"color=c={color}:s=96x64:r=10:d=2"))

0 commit comments

Comments
 (0)