def test_write(tmpdir): fname = pathlib.Path(str(tmpdir)) / 'profile.tsv' prf = Profile({ 'Grapheme': 'ab', 'IPA': 'z' }, { 'Grapheme': 'x', 'IPA': 'y' }) prf.write(fname) assert Profile.from_file(fname).graphemes == prf.graphemes
def test_write(tmp_path): fname = tmp_path / 'profile.tsv' prf = Profile({ 'Grapheme': 'ab', 'IPA': 'z' }, { 'Grapheme': 'x', 'IPA': 'y' }) prf.write(fname) assert Profile.from_file(fname).graphemes == prf.graphemes