<reponame>slaclab/lume-model<gh_stars>1-10
import pytest
import sys

# test value and failed initialization with characters
@pytest.mark.parametrize(
    "offset,scale,lower,upper",
    [
        (1, 2, 0, 1),
        (5, 4, -1, 1),
        pytest.param("t", "e", "s", "t", marks=pytest.mark.xfail),
    ],
)
def test_scale_layer(offset, scale, lower, upper):
    layers = pytest.importorskip("lume_model.keras.layers")
    scale_layer = layers.ScaleLayer(offset, scale, lower, upper)


# test value and failed initialization with characters
@pytest.mark.parametrize(
    "offset,scale,lower,upper",
    [
        (1, 2, 0, 1),
        (5, 4, -1, 1),
        pytest.param("t", "e", "s", "t", marks=pytest.mark.xfail),
    ],
)
def test_unscale_layer(offset, scale, lower, upper):
    layers = pytest.importorskip("lume_model.keras.layers")
    unscale_layer = layers.UnscaleLayer(offset, scale, lower, upper)


# test value and failed initialization with characters
@pytest.mark.parametrize(
    "offset,scale", [(1, 2), (5, 4), pytest.param("t", "e", marks=pytest.mark.xfail),],
)
def test_unscale_image_layer(offset, scale):
    layers = pytest.importorskip("lume_model.keras.layers")
    unscale_layer = layers.UnscaleImgLayer(offset, scale)

import pytest
import sys

# test value and failed initialization with characters
@pytest.mark.parametrize(
    "offset,scale,lower,upper",
    [
        (1, 2, 0, 1),
        (5, 4, -1, 1),
        pytest.param("t", "e", "s", "t", marks=pytest.mark.xfail),
    ],
)
def test_scale_layer(offset, scale, lower, upper):
    layers = pytest.importorskip("lume_model.keras.layers")
    scale_layer = layers.ScaleLayer(offset, scale, lower, upper)


# test value and failed initialization with characters
@pytest.mark.parametrize(
    "offset,scale,lower,upper",
    [
        (1, 2, 0, 1),
        (5, 4, -1, 1),
        pytest.param("t", "e", "s", "t", marks=pytest.mark.xfail),
    ],
)
def test_unscale_layer(offset, scale, lower, upper):
    layers = pytest.importorskip("lume_model.keras.layers")
    unscale_layer = layers.UnscaleLayer(offset, scale, lower, upper)


# test value and failed initialization with characters
@pytest.mark.parametrize(
    "offset,scale", [(1, 2), (5, 4), pytest.param("t", "e", marks=pytest.mark.xfail),],
)
def test_unscale_image_layer(offset, scale):
    layers = pytest.importorskip("lume_model.keras.layers")
    unscale_layer = layers.UnscaleImgLayer(offset, scale)
# test value and failed initialization with characters # test value and failed initialization with characters # test value and failed initialization with characters