File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ def render():
3232
3333@pytest .fixture
3434def simpletilespec ():
35- mml = renderapi .image_pyramid .MipMapLevel (0 , '/not/a/path.jpg' )
35+ mm = renderapi .image_pyramid .MipMap (imageUrl = 'file://not/a/path.jpg' )
36+ ip = renderapi .image_pyramid .ImagePyramid ({0 : mm })
3637 tform = renderapi .transform .AffineModel (labels = ['simple' ])
3738 layout = renderapi .tilespec .Layout (sectionId = "section0" ,
3839 scopeId = "testscope" ,
@@ -45,7 +46,7 @@ def simpletilespec():
4546 ts = renderapi .tilespec .TileSpec (tileId = "1000" ,
4647 width = 2048 ,
4748 height = 2048 ,
48- mipMapLevels = [ mml ] ,
49+ imagePyramid = ip ,
4950 z = 0 ,
5051 tforms = [tform ],
5152 layout = layout )
Original file line number Diff line number Diff line change 1010 logger .info (e )
1111 logger .info ('scipy-based linalg may or may not lead '
1212 'to better parameter fitting' )
13- from numpy .linalg import svd
14- from numpy . linalg . linalg import LinAlgError
13+ from numpy .linalg import svd , LinAlgError
14+
1515__all__ = [
1616 'Polynomial2DTransform' , 'NonLinearCoordinateTransform' ,
1717 'NonLinearTransform' , 'LensCorrection' ]
Original file line number Diff line number Diff line change @@ -74,18 +74,20 @@ def test_pyramid_deserialize():
7474
7575
7676def test_mipmaplevel_deprecated ():
77- mml = image_pyramid .MipMapLevel (0 ,
78- imageUrl = image_filename ,
79- maskUrl = mask_filename )
77+ with pytest .deprecated_call ():
78+ mml = image_pyramid .MipMapLevel (
79+ 0 ,
80+ imageUrl = image_filename ,
81+ maskUrl = mask_filename )
8082 assert (mml ['imageUrl' ] == image_filename )
8183 assert (mml ['maskUrl' ] == mask_filename )
8284 with pytest .raises (KeyError ):
8385 mml ['not_a_key' ]
8486
8587 assert (mml == mml )
86-
87- mml2 = image_pyramid .MipMapLevel (0 ,
88- imageUrl = image_filename )
88+ with pytest . deprecated_call ():
89+ mml2 = image_pyramid .MipMapLevel (0 ,
90+ imageUrl = image_filename )
8991 assert (mml != mml2 )
9092 assert (len ([k for k , v in mml ]) == 2 )
9193
You can’t perform that action at this time.
0 commit comments