Skip to content

Commit fd90f8e

Browse files
authored
Attempt to fix flaky Windows json issue on tests (#1387)
1 parent 9f0e047 commit fd90f8e

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

test/test_encoders.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def validate_frames_properties(*, actual: Path, expected: Path):
7979
f"{f}",
8080
],
8181
check=True,
82-
capture_output=True,
82+
stdout=subprocess.PIPE,
83+
stderr=subprocess.DEVNULL,
8384
text=True,
8485
).stdout
8586
)["frames"]
@@ -638,7 +639,8 @@ def _get_video_metadata(self, file_path, fields):
638639
"default=noprint_wrappers=1",
639640
str(file_path),
640641
],
641-
capture_output=True,
642+
stdout=subprocess.PIPE,
643+
stderr=subprocess.DEVNULL,
642644
check=True,
643645
text=True,
644646
)
@@ -665,7 +667,8 @@ def _get_frames_info(self, file_path, fields):
665667
"json",
666668
str(file_path),
667669
],
668-
capture_output=True,
670+
stdout=subprocess.PIPE,
671+
stderr=subprocess.DEVNULL,
669672
check=True,
670673
text=True,
671674
)

test/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ def generate_custom_frame_mappings(self, stream_index: int) -> str:
361361
"json",
362362
],
363363
check=True,
364-
capture_output=True,
364+
stdout=subprocess.PIPE,
365+
stderr=subprocess.DEVNULL,
365366
text=True,
366367
).stdout
367368
return result

0 commit comments

Comments
 (0)