forked from 00dani/lemoncurry
Use proper path converter for lemonshort
This commit is contained in:
parent
cfeb206154
commit
683adc1b46
5 changed files with 20 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue