From a70aca6f7c6e5b1cc9d0273394212d5a21043e78 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sat, 13 Dec 2014 15:53:50 -0800 Subject: [PATCH] Updated travis-ci tests --- .travis.yml | 9 +-------- Makefile | 5 +++++ tests/db_tests.py | 4 ++-- tests/encoding_tests.py | 2 +- tests/test_lib.py | 7 +++---- 5 files changed, 12 insertions(+), 15 deletions(-) create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml index 618a67c2..b6ef57b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,6 @@ python: - 2.6 - 2.7 -env: - - DB=sqlite:// - branches: only: - develop @@ -13,12 +10,8 @@ branches: install: - pip install cheetah -before_script: - - cd ./tests - - chmod +x ./all_tests.py - script: - - ./all_tests.py + - make tests-all notifications: irc: "irc.freenode.net#sickrage" \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..b3aed134 --- /dev/null +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/tests/db_tests.py b/tests/db_tests.py index 5b52e704..4802ad97 100644 --- a/tests/db_tests.py +++ b/tests/db_tests.py @@ -50,5 +50,5 @@ if __name__ == '__main__': suite = unittest.TestLoader().loadTestsFromTestCase(DBBasicTests) unittest.TextTestRunner(verbosity=2).run(suite) - suite = unittest.TestLoader().loadTestsFromTestCase(DBMultiTests) - unittest.TextTestRunner(verbosity=2).run(suite) + #suite = unittest.TestLoader().loadTestsFromTestCase(DBMultiTests) + #unittest.TextTestRunner(verbosity=2).run(suite) diff --git a/tests/encoding_tests.py b/tests/encoding_tests.py index 9aa429c2..ee6ad911 100644 --- a/tests/encoding_tests.py +++ b/tests/encoding_tests.py @@ -24,7 +24,7 @@ class EncodingTests(unittest.TestCase): if __name__ == "__main__": print "==================" - print "STARTING - Encoding TESTS" + print "STARTING - ENCODING TESTS" print "==================" print "######################################################################" suite = unittest.TestLoader().loadTestsFromTestCase(EncodingTests) diff --git a/tests/test_lib.py b/tests/test_lib.py index 201d2182..bfeb4314 100644 --- a/tests/test_lib.py +++ b/tests/test_lib.py @@ -32,10 +32,11 @@ sys.path.append(os.path.abspath('../lib')) import sickbeard import shutil -from sickbeard import encodingKludge as ek, providers, tvcache +from sickbeard import providers, tvcache from sickbeard import db from sickbeard.databases import mainDB from sickbeard.databases import cache_db, failed_db +from sickbeard.tv import TVEpisode #================= # 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.SBRotatingLogHandler.log_file = os.path.join(os.path.join(TESTDIR, 'Logs'), 'test_sickbeard.log') - #================= # prepare env functions #================= @@ -112,8 +112,7 @@ mainDB.sickbeard.save_config = _dummy_saveConfig def _fake_specifyEP(self, season, episode): pass -sickbeard.tv.TVEpisode.specifyEpisode = _fake_specifyEP - +TVEpisode.specifyEpisode = _fake_specifyEP #================= # test classes