Skip to content

Commit c6c7326

Browse files
author
linzeen
committed
[modify] Add main function
1 parent e1da680 commit c6c7326

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

unit_test/test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import asyncio
22
import time
3+
import unittest
34
from functools import wraps
4-
from unittest import TestCase
55

66
from simple_proxy_pool.proxy_pool import ProxyPool
77
from simple_proxy_pool.spider import XiCiSpider
88

99

10-
class TestBase(TestCase):
10+
class TestBase(unittest.TestCase):
1111
def verify_url(self, url):
1212
self.assertRegex(url, r"http://\d+\.\d+\.\d+\.\d+:\d+")
1313

@@ -78,3 +78,7 @@ def test_get_https_urls(self):
7878
urls = self.pl.get_https_urls(nums=15)
7979
self.assertEqual(len(urls), nums)
8080
self.verify_urls(urls)
81+
82+
83+
if __name__ == '__main__':
84+
unittest.main()

0 commit comments

Comments
 (0)