Revision 76d9365a sdk/python/tests/test_util.py

View differences:

sdk/python/tests/test_util.py
20 20
    def runTest(self):
21 21
        arvados.util.mkdir_dash_p('./tmp/foo')
22 22
        with open('./tmp/bar', 'wb') as f:
23
            f.write('bar')
23
            f.write(b'bar')
24 24
        self.assertRaises(OSError, arvados.util.mkdir_dash_p, './tmp/bar')
25 25

  
26 26

  
......
28 28
    def test_success(self):
29 29
        stdout, stderr = arvados.util.run_command(['echo', 'test'],
30 30
                                                  stderr=subprocess.PIPE)
31
        self.assertEqual("test\n", stdout)
32
        self.assertEqual("", stderr)
31
        self.assertEqual("test\n".encode(), stdout)
32
        self.assertEqual("".encode(), stderr)
33 33

  
34 34
    def test_failure(self):
35 35
        with self.assertRaises(arvados.errors.CommandFailedError):

Also available in: Unified diff