aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-06-18 23:53:17 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-06-18 23:53:17 -0400
commitc61321af05390ceca865fb816246b7c1bca57a32 (patch)
treecd5b32253bdebc0a956cfd2a855beccca80951a5 /tests
parentdf78f1f1e8fc390a039dd76ab892919a15da640c (diff)
downloadqolab-c61321af05390ceca865fb816246b7c1bca57a32.tar.gz
qolab-c61321af05390ceca865fb816246b7c1bca57a32.zip
added ability to read gzip compressed traces
Diffstat (limited to 'tests')
-rw-r--r--tests/test_trace.py8
-rw-r--r--tests/trace_test_data/xtrace1.dat.gzbin0 -> 146 bytes
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_trace.py b/tests/test_trace.py
index 06f43c5..981d1b7 100644
--- a/tests/test_trace.py
+++ b/tests/test_trace.py
@@ -9,3 +9,11 @@ def test_load_uncompressed_v0dot1_trace():
data = tr.getData()
assert np.all( (data - np.array([[1], [3], [2], [5]])) == 0 )
+def test_load_gzip_compressed_v0dot1_trace():
+ tr = loadTrace('tests/trace_test_data/xtrace1.dat.gz')
+ cfg = tr.getConfig()
+ assert cfg['config']['version'] == '0.1'
+ assert cfg['config']['model'] == 'Trace'
+ data = tr.getData()
+ assert np.all( (data - np.array([[1], [3], [2], [5]])) == 0 )
+
diff --git a/tests/trace_test_data/xtrace1.dat.gz b/tests/trace_test_data/xtrace1.dat.gz
new file mode 100644
index 0000000..4b8fa2c
--- /dev/null
+++ b/tests/trace_test_data/xtrace1.dat.gz
Binary files differ