test/test_gphys.rb in gphys-1.4.3.2 vs test/test_gphys.rb in gphys-1.5.0
- old
+ new
@@ -1,14 +1,18 @@
-$LOAD_PATH.unshift("../lib/")
-require "numru/gphys/gphys.rb"
-require "numru/gphys/gphys_io.rb"
+require "numru/gphys/gphys"
+require "numru/gphys/gphys_io"
require "test/unit"
include NumRu
class GPhysTest < Test::Unit::TestCase
def setup
- @T = GPhys::IO.open("../testdata/T.jan.nc","T") # NetCDF data
- @Tgd = GPhys::IO.open("../testdata/T.jan.ctl","T") # GrADS data
+ begin
+ @T = GPhys::IO.open("testdata/T.jan.nc","T") # NetCDF data
+ @Tgd = GPhys::IO.open("testdata/T.jan.ctl","T") # GrADS data
+ rescue NetcdfSyserr
+ @T = GPhys::IO.open("../testdata/T.jan.nc","T") # NetCDF data
+ @Tgd = GPhys::IO.open("../testdata/T.jan.ctl","T") # GrADS data
+ end
end
def test_cyclic_ext
te = @T.cyclic_ext(0)
assert_equal( te.shape[0], @T.shape[0]+1 ) # to make sure it is extened