python: Implement phogen encode

Implement phogen.encode() to encode Bhashes to phogen strings. This
commit also adds unit tests for the above function.
This commit is contained in:
2021-11-03 11:26:02 +01:00
parent 52935bc765
commit ea5abfe149
3 changed files with 52 additions and 3 deletions

View File

@ -9,8 +9,11 @@ test('test_phogen_map',
'PHOGEN_MAP_PY=@0@'.format(_phogen_map_py),
'PHOGEN_WORD_LIST=@0@'.format(_word_list)])
test('test_bhash',
test('test_bhash_py',
find_program('test_bhash.py'),
env: ['SOURCE_ROOT=' + meson.project_source_root(),
'PYTHONPATH=' + PYTHONPATH])
env: ['PYTHONPATH=' + PYTHONPATH])
test('test_phogen_py',
find_program('test_phogen.py'),
env: ['PYTHONPATH=' + PYTHONPATH])