1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 03:22:22 -05:00

Merge pull request #795 from adam111316/travis

Update .travis.yml, fix imports and tests
This commit is contained in:
adam111316 2014-09-13 13:23:32 +08:00
commit 8a35355d49
3 changed files with 9 additions and 9 deletions

View File

@ -4,11 +4,8 @@ python:
- 2.6 - 2.6
- 2.7 - 2.7
# whitelist install:
branches: - pip install cheetah
only:
- ThePirateBay
- Pistachitos
before_script: cd ./tests before_script: cd ./tests
script: ./all_tests.py script: python all_tests.py

View File

@ -28,6 +28,8 @@ from threading import Lock
# apparently py2exe won't build these unless they're imported somewhere # apparently py2exe won't build these unless they're imported somewhere
import sys import sys
import os.path
sys.path.append(os.path.abspath('../lib'))
from sickbeard import providers, metadata, config, webserveInit from sickbeard import providers, metadata, config, webserveInit
from sickbeard.providers.generic import GenericProvider from sickbeard.providers.generic import GenericProvider
from providers import ezrss, tvtorrents, btn, newznab, womble, thepiratebay, torrentleech, kat, iptorrents, \ from providers import ezrss, tvtorrents, btn, newznab, womble, thepiratebay, torrentleech, kat, iptorrents, \

View File

@ -21,13 +21,13 @@
if __name__ == "__main__": if __name__ == "__main__":
import glob import glob
import unittest import unittest
import sys
test_file_strings = [ x for x in glob.glob('*_tests.py') if not x in __file__] test_file_strings = [ x for x in glob.glob('*_tests.py') if not x in __file__]
module_strings = [file_string[0:len(file_string) - 3] for file_string in test_file_strings] module_strings = [file_string[0:len(file_string) - 3] for file_string in test_file_strings]
suites = [unittest.defaultTestLoader.loadTestsFromName(file_string) for file_string in module_strings] suites = [unittest.defaultTestLoader.loadTestsFromName(file_string) for file_string in module_strings]
testSuite = unittest.TestSuite(suites) testSuite = unittest.TestSuite(suites)
print "==================" print "=================="
print "STARTING - ALL TESTS" print "STARTING - ALL TESTS"
print "==================" print "=================="
@ -35,5 +35,6 @@ if __name__ == "__main__":
for includedfiles in test_file_strings: for includedfiles in test_file_strings:
print "- " + includedfiles print "- " + includedfiles
text_runner = unittest.TextTestRunner().run(testSuite) text_runner = unittest.TextTestRunner().run(testSuite)
if not text_runner.wasSuccessful():
sys.exit(-1)