summaryrefslogtreecommitdiffhomepage
path: root/test/test_verbose_output.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <[email protected]>2016-08-13 17:36:14 +0800
committerYen Chi Hsuan <[email protected]>2016-08-13 17:36:14 +0800
commit52aa7e7476415ec632053f85f9db0919f7bf75c3 (patch)
tree80f23dceb5ba33a0a1cd4efc69fdb221f218cdee /test/test_verbose_output.py
parente97c55ee6aaf5170f86bc8146a20cef56e337a3d (diff)
downloadyoutube-dl-52aa7e7476415ec632053f85f9db0919f7bf75c3.tar.gz
youtube-dl-52aa7e7476415ec632053f85f9db0919f7bf75c3.zip
[test_verbose_output] Fix tests under Python 3
Diffstat (limited to 'test/test_verbose_output.py')
-rw-r--r--test/test_verbose_output.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/test_verbose_output.py b/test/test_verbose_output.py
index 4c77df242..96a66f7a0 100644
--- a/test/test_verbose_output.py
+++ b/test/test_verbose_output.py
@@ -22,10 +22,10 @@ class TestVerboseOutput(unittest.TestCase):
'--password', 'secret',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
- self.assertTrue('--username' in serr)
- self.assertTrue('johnsmith' not in serr)
- self.assertTrue('--password' in serr)
- self.assertTrue('secret' not in serr)
+ self.assertTrue(b'--username' in serr)
+ self.assertTrue(b'johnsmith' not in serr)
+ self.assertTrue(b'--password' in serr)
+ self.assertTrue(b'secret' not in serr)
def test_private_info_shortarg(self):
outp = subprocess.Popen(
@@ -35,10 +35,10 @@ class TestVerboseOutput(unittest.TestCase):
'-p', 'secret',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
- self.assertTrue('-u' in serr)
- self.assertTrue('johnsmith' not in serr)
- self.assertTrue('-p' in serr)
- self.assertTrue('secret' not in serr)
+ self.assertTrue(b'-u' in serr)
+ self.assertTrue(b'johnsmith' not in serr)
+ self.assertTrue(b'-p' in serr)
+ self.assertTrue(b'secret' not in serr)
def test_private_info_eq(self):
outp = subprocess.Popen(
@@ -48,10 +48,10 @@ class TestVerboseOutput(unittest.TestCase):
'--password=secret',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
- self.assertTrue('--username' in serr)
- self.assertTrue('johnsmith' not in serr)
- self.assertTrue('--password' in serr)
- self.assertTrue('secret' not in serr)
+ self.assertTrue(b'--username' in serr)
+ self.assertTrue(b'johnsmith' not in serr)
+ self.assertTrue(b'--password' in serr)
+ self.assertTrue(b'secret' not in serr)
def test_private_info_shortarg_eq(self):
outp = subprocess.Popen(
@@ -61,10 +61,10 @@ class TestVerboseOutput(unittest.TestCase):
'-p=secret',
], cwd=rootDir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sout, serr = outp.communicate()
- self.assertTrue('-u' in serr)
- self.assertTrue('johnsmith' not in serr)
- self.assertTrue('-p' in serr)
- self.assertTrue('secret' not in serr)
+ self.assertTrue(b'-u' in serr)
+ self.assertTrue(b'johnsmith' not in serr)
+ self.assertTrue(b'-p' in serr)
+ self.assertTrue(b'secret' not in serr)
if __name__ == '__main__':
unittest.main()