1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00

Fix whitespace damage (causing indentation errors)

This commit is contained in:
Olof Johansson 2013-03-02 21:28:58 +01:00
parent 663287b541
commit 81d208dd61
2 changed files with 27 additions and 27 deletions

View File

@ -35,14 +35,14 @@ class Aftonbladet():
xml = ET.XML(data) xml = ET.XML(data)
url = xml.find("articleElement").find("mediaElement").find("baseUrl").text url = xml.find("articleElement").find("mediaElement").find("baseUrl").text
path = xml.find("articleElement").find("mediaElement").find("media").attrib["url"] path = xml.find("articleElement").find("mediaElement").find("media").attrib["url"]
live = xml.find("articleElement").find("mediaElement").find("isLive").text live = xml.find("articleElement").find("mediaElement").find("isLive").text
options.other = "-y %s" % path options.other = "-y %s" % path
if start > 0: if start > 0:
options.other = "%s -A %s" % (options.other, str(start)) options.other = "%s -A %s" % (options.other, str(start))
if live == "true": if live == "true":
options.live = True options.live = True
if url == None: if url == None:
log.error("Can't find any video on that page") log.error("Can't find any video on that page")

View File

@ -21,43 +21,43 @@ class progressbarTest(unittest.TestCase):
svtplay.output.progress_stream = self.mockfile svtplay.output.progress_stream = self.mockfile
def test_0_100(self): def test_0_100(self):
svtplay.output.progressbar(100, 0) svtplay.output.progressbar(100, 0)
self.assertEqual( self.assertEqual(
self.mockfile.read(), self.mockfile.read(),
"\r[000/100][..................................................] " "\r[000/100][..................................................] "
) )
def test_progress_1_100(self): def test_progress_1_100(self):
svtplay.output.progressbar(100, 1) svtplay.output.progressbar(100, 1)
self.assertEqual( self.assertEqual(
self.mockfile.read(), self.mockfile.read(),
"\r[001/100][..................................................] " "\r[001/100][..................................................] "
) )
def test_progress_2_100(self): def test_progress_2_100(self):
svtplay.output.progressbar(100, 2) svtplay.output.progressbar(100, 2)
self.assertEqual( self.assertEqual(
self.mockfile.read(), self.mockfile.read(),
"\r[002/100][=.................................................] " "\r[002/100][=.................................................] "
) )
def test_progress_50_100(self): def test_progress_50_100(self):
svtplay.output.progressbar(100, 50) svtplay.output.progressbar(100, 50)
self.assertEqual( self.assertEqual(
self.mockfile.read(), self.mockfile.read(),
"\r[050/100][=========================.........................] " "\r[050/100][=========================.........................] "
) )
def test_progress_100_100(self): def test_progress_100_100(self):
svtplay.output.progressbar(100, 100) svtplay.output.progressbar(100, 100)
self.assertEqual( self.assertEqual(
self.mockfile.read(), self.mockfile.read(),
"\r[100/100][==================================================] " "\r[100/100][==================================================] "
) )
def test_progress_20_100_msg(self): def test_progress_20_100_msg(self):
svtplay.output.progressbar(100, 20, "msg") svtplay.output.progressbar(100, 20, "msg")
self.assertEqual( self.assertEqual(
self.mockfile.read(), self.mockfile.read(),
"\r[020/100][==========........................................] msg" "\r[020/100][==========........................................] msg"
) )