Use proper path converter for lemonshort

This commit is contained in:
Danielle McLean 2022-03-12 15:04:05 +11:00
parent cfeb206154
commit 683adc1b46
5 changed files with 20 additions and 14 deletions

View file

@ -1,7 +1,7 @@
from .. import convert
def test_abc_to_id():
def test_to_python():
samples = {
'A': 0,
'B': 1,
@ -12,8 +12,9 @@ def test_abc_to_id():
'BA': 52,
'BAB': 2705,
}
converter = convert.AbcIdConverter()
for abc, id in samples.items():
assert convert.abc_to_id(abc) == id
assert converter.to_python(abc) == id
def test_id_to_abc():
@ -26,5 +27,6 @@ def test_id_to_abc():
104: 'CA',
130: 'Ca',
}
converter = convert.AbcIdConverter()
for id, abc in samples.items():
assert convert.id_to_abc(id) == abc
assert converter.to_url(id) == abc