Commit 8392a4b7 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed undeleted output of Test_GeoArray.test_save().


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent ec93ad32
Pipeline #19801 failed with stages
in 9 minutes and 23 seconds
......@@ -421,15 +421,17 @@ class Test_GeoArray(TestCase):
@parameterized.expand(_get_gA_inMem_notInMem())
def test_save(self, _, gA):
"""Test GeoArray.save."""
# Save as temporary GTiff
L8_2bands_extract10x11_copy = os.path.join(tests_path, "tests", "data", "output",
"L8_BadDataMask10x11_copy.tif")
gA.save(L8_2bands_extract10x11_copy, fmt="GTiff")
gA_copy = GeoArray(L8_2bands_extract10x11_copy)
self.assertTrue(os.path.exists(L8_2bands_extract10x11_copy))
self.assertIsInstance(gA_copy, GeoArray)
self.assertTrue(np.array_equal(gA[:], gA_copy[:]))
with tempfile.NamedTemporaryFile(dir=os.path.join(tests_path, "tests", "data", "output"),
prefix="L8_BadDataMask10x11_copy_",
suffix=".tif") as tf:
# Save as temporary GTiff
L8_2bands_extract10x11_copy = tf.name
gA.save(L8_2bands_extract10x11_copy, fmt="GTiff")
gA_copy = GeoArray(L8_2bands_extract10x11_copy)
self.assertTrue(os.path.exists(L8_2bands_extract10x11_copy))
self.assertIsInstance(gA_copy, GeoArray)
self.assertTrue(np.array_equal(gA[:], gA_copy[:]))
def test_show(self):
# test 3D case
......
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