def testPersistence(self): """Test that we can round-trip an ValidPolygon through FITS persistence.""" filename = "testValidPolygon.fits" self.polygon.writeFits(filename) polygon2 = Polygon.readFits(filename) self.assertEqual(self.polygon, polygon2) os.remove(filename)
def testReadWrite(self): """Test that polygons can be read and written to fits files""" for num in range(3, 30): poly = self.polygon(num) with lsst.utils.tests.getTempFilePath(".fits") as filename: poly.writeFits(filename) poly2 = Polygon.readFits(filename) self.assertEqual(poly, poly2)
def testReadWrite(self): """Test that polygons can be read and written to fits files""" for num in range(3, 30): poly = self.polygon(num) filename = 'polygon.fits' poly.writeFits(filename) poly2 = Polygon.readFits(filename) self.assertEqual(poly, poly2) os.remove(filename)
def testReadWrite(self): """Test that polygons can be read and written to fits files""" for num in range(3, 30): poly = self.polygon(num) filename='polygon.fits' poly.writeFits(filename) poly2=Polygon.readFits(filename) self.assertEqual(poly, poly2) os.remove(filename)
def testPersistence(self): """Test that we can round-trip an ValidPolygon through FITS persistence.""" with lsst.utils.tests.getTempFilePath(".fits") as filename: self.polygon.writeFits(filename) polygon2 = Polygon.readFits(filename) self.assertEqual(self.polygon, polygon2)