~linuxgoose/linguistics-robin

ref: ad3fdc410fa157522dd1e00f4a49210e9daa456f linguistics-robin/tests/test_utils.py -rw-r--r-- 369 bytes
ad3fdc41 — Jordan Robinson Merge pull request #24 from linuxgoose/23-caverphone-2-__vowels-undefined-error 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from linguistics_robin.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}