2017-05-20 16:58:44 +03:00
|
|
|
#!/usr/bin/env python3
|
2016-09-08 17:11:37 +03:00
|
|
|
import unittest
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2017-09-04 18:10:04 +03:00
|
|
|
from telethon_tests import \
|
|
|
|
CryptoTests, ParserTests, TLTests, UtilsTests, NetworkTests
|
|
|
|
|
2016-09-08 17:11:37 +03:00
|
|
|
test_classes = [CryptoTests, ParserTests, TLTests, UtilsTests]
|
|
|
|
|
|
|
|
network = input('Run network tests (y/n)?: ').lower() == 'y'
|
|
|
|
if network:
|
|
|
|
test_classes.append(NetworkTests)
|
|
|
|
|
|
|
|
loader = unittest.TestLoader()
|
|
|
|
|
|
|
|
suites_list = []
|
|
|
|
for test_class in test_classes:
|
|
|
|
suite = loader.loadTestsFromTestCase(test_class)
|
|
|
|
suites_list.append(suite)
|
|
|
|
|
|
|
|
big_suite = unittest.TestSuite(suites_list)
|
|
|
|
|
|
|
|
runner = unittest.TextTestRunner()
|
|
|
|
results = runner.run(big_suite)
|