コード例 #1
0
  def testSpyingEndingPattern(self):
    """
    The ending pattern of `spying` is `ying`, because `y` acts as a vowel.
    """
    poetry        = Poetry()
    word          = "spying"
    endingPattern = "ying"

    results = poetry.endingPattern(word)

    self.assertEqual(endingPattern, results)
コード例 #2
0
  def testAllEndingPattern(self):
    """
    The ending pattern of `all` is itself.
    """
    poetry        = Poetry()
    word          = "all"
    endingPattern = "all"

    results = poetry.endingPattern(word)

    self.assertEqual(endingPattern, results)
コード例 #3
0
  def testBoughtEndingPattern(self):
    """
    The ending pattern of `bought` is `ought`.
    """
    poetry        = Poetry()
    word          = "bought"
    endingPattern = "ought"

    results = poetry.endingPattern(word)

    self.assertEqual(endingPattern, results)