进行单元测试

2018-12-19  本文已影响2人  VanJordan
  def testSplitByPunct(self):
    output = data.split_by_punct(
        'hello! world, i\'ve been\nwaiting\tfor\ryou for.a long time')
    expected = [
        'hello', 'world', 'i', 've', 'been', 'waiting', 'for', 'you', 'for',
        'a', 'long', 'time'
    ]
    self.assertListEqual(output, expected)

assert len(lists) >=5,'列表元素个数小于5'

上一篇 下一篇

猜你喜欢

热点阅读