Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions integration_tests/test_stack_integrated.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def render():

@pytest.fixture
def simpletilespec():
mml = renderapi.image_pyramid.MipMapLevel(0, '/not/a/path.jpg')
mm = renderapi.image_pyramid.MipMap(imageUrl='file://not/a/path.jpg')
ip = renderapi.image_pyramid.ImagePyramid({0: mm})
tform = renderapi.transform.AffineModel(labels=['simple'])
layout = renderapi.tilespec.Layout(sectionId="section0",
scopeId="testscope",
Expand All @@ -45,7 +46,7 @@ def simpletilespec():
ts = renderapi.tilespec.TileSpec(tileId="1000",
width=2048,
height=2048,
mipMapLevels=[mml],
imagePyramid=ip,
z=0,
tforms=[tform],
layout=layout)
Expand Down
4 changes: 2 additions & 2 deletions renderapi/transform/leaf/polynomial_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
logger.info(e)
logger.info('scipy-based linalg may or may not lead '
'to better parameter fitting')
from numpy.linalg import svd
from numpy.linalg.linalg import LinAlgError
from numpy.linalg import svd, LinAlgError

__all__ = [
'Polynomial2DTransform', 'NonLinearCoordinateTransform',
'NonLinearTransform', 'LensCorrection']
Expand Down
14 changes: 8 additions & 6 deletions test/test_imagepyramid.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,20 @@ def test_pyramid_deserialize():


def test_mipmaplevel_deprecated():
mml = image_pyramid.MipMapLevel(0,
imageUrl=image_filename,
maskUrl=mask_filename)
with pytest.deprecated_call():
mml = image_pyramid.MipMapLevel(
0,
imageUrl=image_filename,
maskUrl=mask_filename)
assert(mml['imageUrl'] == image_filename)
assert(mml['maskUrl'] == mask_filename)
with pytest.raises(KeyError):
mml['not_a_key']

assert(mml == mml)

mml2 = image_pyramid.MipMapLevel(0,
imageUrl=image_filename)
with pytest.deprecated_call():
mml2 = image_pyramid.MipMapLevel(0,
imageUrl=image_filename)
assert(mml != mml2)
assert(len([k for k, v in mml]) == 2)

Expand Down