Commit b0ae9270 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed remaining test outputs aufter running Test_Geoarray.test_save().


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 8ddd2d40
......@@ -426,16 +426,16 @@ class Test_GeoArray(TestCase):
@parameterized.expand(_get_gA_inMem_notInMem())
def test_save(self, _, gA):
"""Test GeoArray.save."""
with tempfile.NamedTemporaryFile(dir=os.path.join(tests_path, "tests", "data", "output"),
prefix="L8_BadDataMask10x11_copy_",
suffix=".tif") as tf:
with tempfile.TemporaryDirectory(dir=os.path.join(tests_path, "tests", "data", "output"),
prefix='test_save_') as td:
# save GeoArray and validate output
for fmt in ['ENVI', 'GTiff']:
gA.save(tf.name, fmt=fmt)
gA_copy = GeoArray(tf.name)
outpath = os.path.join(td, "TestGeoArray_10x11_copy.tif")
gA.save(outpath, fmt=fmt)
self.assertTrue(os.path.exists(outpath))
self.assertTrue(os.path.exists(tf.name))
gA_copy = GeoArray(outpath)
self.assertIsInstance(gA_copy, GeoArray)
self.assertTrue(np.array_equal(gA[:], gA_copy[:]))
self.assertEqual(gA._nodata, gA_copy._nodata)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment