<commit_before>"""
Tests for coast
"""
import pytest
from pygmt import Figure
from pygmt.helpers.testing import check_figures_equal


@pytest.mark.mpl_image_compare
def test_coast():
    "Simple plot from the GMT docs"
    fig = Figure()
    fig.coast(
        R="-30/30/-40/40",
        J="m0.1i",
        B=5,
        I="1/1p,blue",
        N="1/0.25p,-",
        W="0.25p,white",
        G="green",
        S="blue",
        D="c",
        A=10000,
    )
    return fig


@check_figures_equal()
def test_coast_iceland():
    "Test passing in R as a list"
    fig_ref, fig_test = Figure(), Figure()
    # Use single-character arguments for the reference image
    fig_ref.coast(R="-30/-10/60/65", J="m1c", B="", G="p28+r100")
    fig_test.coast(
        region=[-30, -10, 60, 65], projection="m1c", frame=True, land="p28+r100"
    )
    return fig_ref, fig_test


@check_figures_equal()
def test_coast_aliases():
    "Test that all aliases work"
    fig_ref, fig_test = Figure(), Figure()
    fig_ref.coast(
        R="-30/30/-40/40",
        J="M25c",
        B="afg",
        I="1/1p,black",
        N="1/0.5p,-",
        W="0.25p,white",
        G="moccasin",
        S="skyblue",
        D="i",
        A=1000,
        L="jCM+c1+w1000k+f+l",
        U=True,
        X="a4c",
        Y="a10c",
        p="135/25",
        t=13,
    )
    fig_test.coast(
        region=[-30, 30, -40, 40],  # R
        projection="M25c",  # J
        frame="afg",  # B
        rivers="1/1p,black",  # I
        borders="1/0.5p,-",  # N
        shorelines="0.25p,white",  # W
        land="moccasin",  # G
        water="skyblue",  # S
        resolution="i",  # D
        area_thresh=1000,  # A
        map_scale="jCM+c1+w1000k+f+l",  # L
        timestamp=True,  # U
        xshift="a4c",  # X
        yshift="a10c",  # Y
        perspective=[135, 25],  # p
        transparency=13,  # t
    )
    return fig_ref, fig_test


@pytest.mark.mpl_image_compare
def test_coast_world_mercator():<commit_msg>Remove timestamp from test_coast_alias (#785)<commit_after>"""
Tests for coast
"""
import pytest
from pygmt import Figure
from pygmt.helpers.testing import check_figures_equal


@pytest.mark.mpl_image_compare
def test_coast():
    "Simple plot from the GMT docs"
    fig = Figure()
    fig.coast(
        R="-30/30/-40/40",
        J="m0.1i",
        B=5,
        I="1/1p,blue",
        N="1/0.25p,-",
        W="0.25p,white",
        G="green",
        S="blue",
        D="c",
        A=10000,
    )
    return fig


@check_figures_equal()
def test_coast_iceland():
    "Test passing in R as a list"
    fig_ref, fig_test = Figure(), Figure()
    # Use single-character arguments for the reference image
    fig_ref.coast(R="-30/-10/60/65", J="m1c", B="", G="p28+r100")
    fig_test.coast(
        region=[-30, -10, 60, 65], projection="m1c", frame=True, land="p28+r100"
    )
    return fig_ref, fig_test


@check_figures_equal()
def test_coast_aliases():
    "Test that all aliases work"
    fig_ref, fig_test = Figure(), Figure()
    fig_ref.coast(
        R="-30/30/-40/40",
        J="M25c",
        B="afg",
        I="1/1p,black",
        N="1/0.5p,-",
        W="0.25p,white",
        G="moccasin",
        S="skyblue",
        D="i",
        A=1000,
        L="jCM+c1+w1000k+f+l",
        X="a4c",
        Y="a10c",
        p="135/25",
        t=13,
    )
    fig_test.coast(
        region=[-30, 30, -40, 40],  # R
        projection="M25c",  # J
        frame="afg",  # B
        rivers="1/1p,black",  # I
        borders="1/0.5p,-",  # N
        shorelines="0.25p,white",  # W
        land="moccasin",  # G
        water="skyblue",  # S
        resolution="i",  # D
        area_thresh=1000,  # A
        map_scale="jCM+c1+w1000k+f+l",  # L
        xshift="a4c",  # X
        yshift="a10c",  # Y
        perspective=[135, 25],  # p
        transparency=13,  # t
    )
    return fig_ref, fig_test


@pytest.mark.mpl_image_compare
def test_coast_world_mercator():
{'fraction_non_alphanumeric': 0.16847414880201766, 'fraction_numerical': 0.0648171500630517, 'mean_word_length': 2.032110091743119, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6057407', 'n_tokens_mistral': 1696, 'n_tokens_neox': 1551, 'n_words': 292}