scope 0.5.4__tar.gz → 0.5.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scope-0.5.4 → scope-0.5.5}/PKG-INFO +1 -1
- {scope-0.5.4 → scope-0.5.5}/scope/__init__.py +1 -1
- {scope-0.5.4 → scope-0.5.5}/scope/formats.py +2 -0
- {scope-0.5.4 → scope-0.5.5}/tests/test_video.py +11 -5
- {scope-0.5.4 → scope-0.5.5}/README.md +0 -0
- {scope-0.5.4 → scope-0.5.5}/requirements.txt +0 -0
- {scope-0.5.4 → scope-0.5.5}/scope/reader.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/scope/writer.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/setup.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/tests/test_float.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/tests/test_image.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/__init__.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/__main__.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/config.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/dist/assets/index-B4vKLOLB.js +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/dist/assets/index-DlmV1_Hx.css +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/dist/assets/material-symbols-DplPX30d.woff2 +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/dist/favicon.png +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/dist/index.html +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/dist/logo.png +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/filesystems.py +0 -0
- {scope-0.5.4 → scope-0.5.5}/viewer/server.py +0 -0
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import pathlib
|
|
2
2
|
|
|
3
|
-
import scope
|
|
4
3
|
import numpy as np
|
|
4
|
+
import pytest
|
|
5
|
+
import scope
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class TestVideo:
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
@pytest.mark.parametrize('channels', (3, 1))
|
|
11
|
+
@pytest.mark.parametrize('fmt', (
|
|
12
|
+
scope.formats.Video(fps=10),
|
|
13
|
+
scope.formats.MediapyVideo(fps=10),
|
|
14
|
+
))
|
|
15
|
+
def test_roundtrip(self, tmpdir, fmt, channels):
|
|
10
16
|
logdir = pathlib.Path(tmpdir)
|
|
11
|
-
writer = scope.Writer(logdir, workers=0)
|
|
12
|
-
vid1 = np.ones((5, 64, 128,
|
|
13
|
-
vid2 = np.ones((5, 64, 128,
|
|
17
|
+
writer = scope.Writer(logdir, workers=0, formats=[fmt])
|
|
18
|
+
vid1 = np.ones((5, 64, 128, channels), np.uint8) + 12
|
|
19
|
+
vid2 = np.ones((5, 64, 128, channels), np.uint8) + 255
|
|
14
20
|
writer.add(0, {'foo': vid1})
|
|
15
21
|
writer.add(5, {'foo': vid2})
|
|
16
22
|
writer.flush()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|