you-get/tests/test_common.py
Mark Mayo 4be4f650d0 Fixed deprecated module, whitespace, booleans and other small tidyups
Lots of whitespace, cleanups
simplified if conditions
Cleaned up imports (using isort)
fixed use of deprecated imp module
2022-11-27 21:04:02 +13:00

13 lines
360 B
Python

#!/usr/bin/env python
import unittest
from you_get.common 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'])