mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 11:24:02 +03:00
add tests.test_common
This commit is contained in:
parent
72df45bc8e
commit
c4db743bdb
11
tests/test_common.py
Normal file
11
tests/test_common.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/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'])
|
Loading…
x
Reference in New Issue
Block a user