コード例 #1
0
ファイル: test_words.py プロジェクト: ccoakley/wordgames
  def test_decompose(self):
    words = Words(dictionary_url="https://fakurl.com/")
    words.words = ["bad", "dab", "cab"]
    words.preprocess_dict()

    ret = words.decompose("bade")

    self.assertIn("bad", ret)
    self.assertIn("dab", ret)
    self.assertNotIn("cab", ret)
コード例 #2
0
ファイル: test_words.py プロジェクト: ccoakley/wordgames
  def test_preprocess_dict(self):
    words = Words(dictionary_url="https://fakurl.com/")
    words.words = ["bad", "dab"]

    ret = words.preprocess_dict()

    self.assertIn("abd", ret)
    self.assertIn("bad", ret["abd"])
    self.assertIn("dab", ret["abd"])