Example #1
0
    def test_iojson_text(self):
        self.cast.save_json(os.path.join(DATADIR, "json_cast.nwl"), 
                            binary=False)

        cast = narwhal.load_json(os.path.join(DATADIR, "json_cast.nwl"))

        self.assertTrue(np.all(cast["pres"] == self.cast["pres"]))
        self.assertTrue(np.all(cast["temp"] == self.cast["temp"]))
        self.assertTrue(np.all(cast["sal"] == self.cast["sal"]))
        self.assertEqual(cast.p["date"], self.cast.p["date"])
        return
Example #2
0
    def setUp(self):

        self.ctds = narwhal.load_json(os.path.join(DATADIR, "line_w_dec1997.nwl"))
Example #3
0
    def setUp(self):

        self.ctds = narwhal.load_json(
            os.path.join(DATADIR, "line_w_dec1997.nwl"))