提交 c4db743b 编写于 作者: M Mort Yao

add tests.test_common

上级 72df45bc
#!/usr/bin/env python
import unittest
from you_get import *
class TestCommon(unittest.TestCase):
def test_match1(self):
self.assertEqual(match1('http://youtu.be/1234567890A', r'youtu.be/([^/]+)'), '1234567890A')
self.assertEqual(match1('http://youtu.be/1234567890A', r'youtu.be/([^/]+)', r'youtu.(\w+)'), ['1234567890A', 'be'])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册