def METHOD_NAME(tmpdir, runner):
    """Check on issue #2401"""
    outfile = str(tmpdir.join("out.tif"))
    result = runner.invoke(
        main_group,
        ["calc"]
        + [
            "(>= (read 1 1) 127)",
            "-t",
            "uint8",
            "--masked",
            "--profile",
            "nodata=255",
            "tests/data/RGB.byte.tif",
            outfile,
        ],
        catch_exceptions=False,
    )
    assert result.exit_code == 0
    with rasterio.open(outfile) as src:
        assert (src.read() == 255).any()