[segyio] 160/376: Matlab tests writes to own copy of prestack file

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

jokva-guest pushed a commit to branch debian
in repository segyio.

commit 8551226b0ef462227ff88ee01ac66afd3d10cc4c
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Tue Jan 17 10:43:05 2017 +0100

    Matlab tests writes to own copy of prestack file
    
    Matlab wrote to the small-ps.sgy file that is also used by other tests,
    which would make them fail if the matlab tests ran first.
    
    Write the modified line to a copy of the test-data/small-ps.sgy file to
    make tests more atomic and repeatable.
---
 tests/test_segy_mex.m | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/test_segy_mex.m b/tests/test_segy_mex.m
index 021d6f1..2e2f5b5 100644
--- a/tests/test_segy_mex.m
+++ b/tests/test_segy_mex.m
@@ -258,10 +258,13 @@ assert(abs(ps_line1(2,2,1) - 201.01001) < eps);
 assert(abs(ps_line1(3,2,1) - 201.01002) < eps);
 assert(abs(ps_line1(2,2,2) - 201.02001) < eps);
 
-% test writing of prestack lines
-Segy.put_ps_line( cube_with_offsets, ps_line1 - 100.00, 'iline', 1 );
+%%%%% test writing of prestack lines
+prestack_dest = 'test-data/mex-tmp-small-ps.sgy';
+assert(copyfile(prestack_filename, prestack_dest));
+ps_cube_w = Segy.parse_ps_segycube(prestack_dest);
+Segy.put_ps_line( ps_cube_w, ps_line1 - 100.00, 'iline', 1 );
 % offset 1
-wr_line1 = Segy.get_ps_line( cube_with_offsets, 'iline', 1 );
+wr_line1 = Segy.get_ps_line( ps_cube_w, 'iline', 1 );
 assert(abs(wr_line1(1,1,1) - 001.01)    < eps);
 assert(abs(wr_line1(1,1,2) - 001.02)    < eps);
 assert(abs(wr_line1(1,1,3) - 001.03)    < eps);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/segyio.git



More information about the debian-science-commits mailing list