File size: 321 Bytes
cb5b71d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
"""Tests for `names` module."""

from .names import find_unique_name


def test_find_unique_name():
    names = set(["first", "second", "first_0"])
    assert find_unique_name(names, "first") == "first_0_0"
    assert find_unique_name(names, "second") == "second_0"
    assert find_unique_name(names, "third") == "third"