1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Updated travis-ci tests

This commit is contained in:
echel0n 2014-12-13 15:53:50 -08:00
parent 68cca69b9f
commit a70aca6f7c
5 changed files with 12 additions and 15 deletions

View File

@ -3,9 +3,6 @@ python:
- 2.6 - 2.6
- 2.7 - 2.7
env:
- DB=sqlite://
branches: branches:
only: only:
- develop - develop
@ -13,12 +10,8 @@ branches:
install: install:
- pip install cheetah - pip install cheetah
before_script:
- cd ./tests
- chmod +x ./all_tests.py
script: script:
- ./all_tests.py - make tests-all
notifications: notifications:
irc: "irc.freenode.net#sickrage" irc: "irc.freenode.net#sickrage"

5
Makefile Normal file
View File

@ -0,0 +1,5 @@
test-all:
@ nosetests --cover-package=sickrage --verbosity=1 --cover-erase
test-all-with-coverage:
@ nosetests --cover-package=sickrage --verbosity=1 --cover-erase --with-coverage

View File

@ -50,5 +50,5 @@ if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(DBBasicTests) suite = unittest.TestLoader().loadTestsFromTestCase(DBBasicTests)
unittest.TextTestRunner(verbosity=2).run(suite) unittest.TextTestRunner(verbosity=2).run(suite)
suite = unittest.TestLoader().loadTestsFromTestCase(DBMultiTests) #suite = unittest.TestLoader().loadTestsFromTestCase(DBMultiTests)
unittest.TextTestRunner(verbosity=2).run(suite) #unittest.TextTestRunner(verbosity=2).run(suite)

View File

@ -24,7 +24,7 @@ class EncodingTests(unittest.TestCase):
if __name__ == "__main__": if __name__ == "__main__":
print "==================" print "=================="
print "STARTING - Encoding TESTS" print "STARTING - ENCODING TESTS"
print "==================" print "=================="
print "######################################################################" print "######################################################################"
suite = unittest.TestLoader().loadTestsFromTestCase(EncodingTests) suite = unittest.TestLoader().loadTestsFromTestCase(EncodingTests)

View File

@ -32,10 +32,11 @@ sys.path.append(os.path.abspath('../lib'))
import sickbeard import sickbeard
import shutil import shutil
from sickbeard import encodingKludge as ek, providers, tvcache from sickbeard import providers, tvcache
from sickbeard import db from sickbeard import db
from sickbeard.databases import mainDB from sickbeard.databases import mainDB
from sickbeard.databases import cache_db, failed_db from sickbeard.databases import cache_db, failed_db
from sickbeard.tv import TVEpisode
#================= #=================
# test globals # test globals
@ -56,7 +57,6 @@ SHOWDIR = os.path.join(TESTDIR, SHOWNAME + " final")
#sickbeard.logger.sb_log_instance = sickbeard.logger.SBRotatingLogHandler(os.path.join(TESTDIR, 'sickbeard.log'), sickbeard.logger.NUM_LOGS, sickbeard.logger.LOG_SIZE) #sickbeard.logger.sb_log_instance = sickbeard.logger.SBRotatingLogHandler(os.path.join(TESTDIR, 'sickbeard.log'), sickbeard.logger.NUM_LOGS, sickbeard.logger.LOG_SIZE)
sickbeard.logger.SBRotatingLogHandler.log_file = os.path.join(os.path.join(TESTDIR, 'Logs'), 'test_sickbeard.log') sickbeard.logger.SBRotatingLogHandler.log_file = os.path.join(os.path.join(TESTDIR, 'Logs'), 'test_sickbeard.log')
#================= #=================
# prepare env functions # prepare env functions
#================= #=================
@ -112,8 +112,7 @@ mainDB.sickbeard.save_config = _dummy_saveConfig
def _fake_specifyEP(self, season, episode): def _fake_specifyEP(self, season, episode):
pass pass
sickbeard.tv.TVEpisode.specifyEpisode = _fake_specifyEP TVEpisode.specifyEpisode = _fake_specifyEP
#================= #=================
# test classes # test classes