Ejemplo n.º 1
0
def test_uniqueness_of_short_names():
    """Test whether all shortened component names are unique."""
    from reana.cli import shorten_component_name, REPO_LIST_ALL
    short_names = []
    for repo in REPO_LIST_ALL:
        short_name = shorten_component_name(repo)
        if short_name in short_names:
            raise Exception('Found ')
        short_names.append(short_name)
Ejemplo n.º 2
0
def test_shorten_component_name():
    """Tests for shorten_component_name()."""
    from reana.cli import shorten_component_name
    for (name_long, name_short) in (
        ('', ''),
        ('reana', 'reana'),
        ('reana-job-controller', 'r-j-controller'),
    ):
        assert name_short == shorten_component_name(name_long)
Ejemplo n.º 3
0
def test_shorten_component_name():
    """Tests for shorten_component_name()."""
    from reana.cli import shorten_component_name

    for (name_long, name_short) in (
        ("", ""),
        ("reana", "reana"),
        ("reana-job-controller", "r-j-controller"),
    ):
        assert name_short == shorten_component_name(name_long)