From 2c845b4bcb506d4bc79effc3063a99a9d46fa6c6 Mon Sep 17 00:00:00 2001 From: Yoann Audouin Date: Mon, 12 Jul 2021 14:30:44 +0200 Subject: [PATCH] Missing file in CMakeFile + better test --- src/SerafinReader/Test/CMakeLists.txt | 1 + src/SerafinReader/Test/test_SerafinReader.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SerafinReader/Test/CMakeLists.txt b/src/SerafinReader/Test/CMakeLists.txt index cc8821a..d99657f 100644 --- a/src/SerafinReader/Test/CMakeLists.txt +++ b/src/SerafinReader/Test/CMakeLists.txt @@ -24,6 +24,7 @@ SET(test_SerafinReader_src geo_dp_le.slf geo_sp.slf geo_sp_le.slf + result.slf test_SerafinReader.py ) diff --git a/src/SerafinReader/Test/test_SerafinReader.py b/src/SerafinReader/Test/test_SerafinReader.py index ed0c02a..ded3620 100644 --- a/src/SerafinReader/Test/test_SerafinReader.py +++ b/src/SerafinReader/Test/test_SerafinReader.py @@ -47,5 +47,6 @@ reader_ds = servermanager.Fetch(reader) anim = GetAnimationScene() tk = anim.TimeKeeper times = tk.TimestepValues -ref_times = [i*1.0 for i in range(10)] -assert(times == ref_times) +ref_times = np.array([i*1.0 for i in range(10)]) +diff = np.abs(ref_times - times) +assert(np.all(diff <= 1e-6)) -- 2.39.2