1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

PEP8 performed on unitests

This commit is contained in:
echel0n 2014-12-13 15:16:11 -08:00
parent 2cba62a0e8
commit 76754ff2ba
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ class DBMultiTests(test.SickbeardTestDBCase):
self.db.select("SELECT * FROM tv_episodes WHERE showid = ? AND location != ''", [0000]) self.db.select("SELECT * FROM tv_episodes WHERE showid = ? AND location != ''", [0000])
def test_threaded(self): def test_threaded(self):
for i in xrange(20): for i in xrange(4):
t = threading.Thread(target=self.select) t = threading.Thread(target=self.select)
t.start() t.start()

View File

@ -11,15 +11,14 @@ from sickbeard.exceptions import ex
sickbeard.SYS_ENCODING = 'UTF-8' sickbeard.SYS_ENCODING = 'UTF-8'
DEBUG = VERBOSE = False
class EncodingTests(unittest.TestCase): class EncodingTests(unittest.TestCase):
def test_encoding(self): def test_encoding(self):
strings = [u'Les Enfants De La Télé'] strings = [u'Les Enfants De La Télé']
for s in strings: for s in strings:
try: try:
print 'Encoded: ' + ek.ss(s) x = ek.ss(s)
assert isinstance(x, unicode)
except Exception, e: except Exception, e:
ex(e) ex(e)
@ -28,4 +27,5 @@ if __name__ == "__main__":
print "STARTING - Encoding TESTS" print "STARTING - Encoding TESTS"
print "==================" print "=================="
print "######################################################################" print "######################################################################"
suite = unittest.TestLoader().loadTestsFromTestCase(EncodingTests) suite = unittest.TestLoader().loadTestsFromTestCase(EncodingTests)
unittest.TextTestRunner(verbosity=2).run(suite)