~linuxgoose/linguistics-robin

ref: b6fd21664674d9f785a5bb71de9abf2aa8854ef3 linguistics-robin/tests/test_utils.py -rw-r--r-- 363 bytes
b6fd2166 — Ilias Koutsakis update pyproject.toml to include description and python version 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from pyphonetics.utils import squeeze, translation


def test_squeeze():
    tests = [
        ('test', 'test'),
        ('hello yellow', 'helo yelow'),
        ('112345566', '123456')
    ]

    for test in tests:
        assert squeeze(test[0]) == test[1]


def test_translation():
    assert translation(['a', 'b', 'c'], [1, 2, 3]) == {'a': 1, 'b': 2, 'c': 3}