Skip to content

Commit

Permalink
Adjust lookup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thatbudakguy committed Feb 23, 2022
1 parent 1d12e08 commit 3746a19
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_lookups.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

class TestLookups(TestCase):
def test_pinyin_lookup(self) -> None:
"""character pinyin lookup data should be available"""
py_lookup_path = spacy.registry.lookups.get("och")()["pinyin_lookup"]
"""character pinyin data should be available"""
py_lookup_path = spacy.registry.lookups.get("och")()["pinyin"]
pinyin = srsly.read_json(py_lookup_path)
self.assertEqual(pinyin["㐁"], ["tiàn"])

def test_variants_lookup(self) -> None:
"""character variant lookup data should be available"""
var_lookup_path = spacy.registry.lookups.get("och")()["variants_lookup"]
variants = srsly.read_json(var_lookup_path)
self.assertEqual(variants["䡵"]["simplified"], ["𫟦"])
def test_numbers_lookup(self) -> None:
"""character numeric data should be available"""
var_lookup_path = spacy.registry.lookups.get("och")()["numbers"]
numeric = srsly.read_json(var_lookup_path)
self.assertEqual(numeric["七"], {"value": 7, "type": "primary"})

0 comments on commit 3746a19

Please sign in to comment.