From 6f8aa2785e0239dbed22fcb4d093a5bc110bcc3c Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 7 May 2019 10:42:23 +0200 Subject: Update to Python3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now Xtesting containers use Python3 instead of python2. https://mail.python.org/pipermail/python-dev/2018-March/152348.html It also updates robotframework to latest release. Change-Id: I57e0d8b1af9aeaae0c445941a9bdf0b8bd346834 Signed-off-by: Cédric Ollivier --- xtesting/tests/unit/core/test_unit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xtesting/tests') diff --git a/xtesting/tests/unit/core/test_unit.py b/xtesting/tests/unit/core/test_unit.py index 20fd6959..0af3ddca 100644 --- a/xtesting/tests/unit/core/test_unit.py +++ b/xtesting/tests/unit/core/test_unit.py @@ -59,7 +59,7 @@ class SuiteTesting(unittest.TestCase): return_value=mock.Mock( communicate=mock.Mock(return_value=("foo", "bar")))) def test_generate_xunit_ok(self, *args): - stream = six.StringIO() + stream = six.BytesIO() with mock.patch('six.moves.builtins.open', mock.mock_open()) as mock_open: self.psrunner.generate_xunit(stream) @@ -96,7 +96,7 @@ class SuiteTesting(unittest.TestCase): with mock.patch('six.moves.builtins.open', mock.mock_open()) as m_open: self.assertEqual(self.psrunner.run(), status) m_open.assert_called_once_with( - '{}/subunit_stream'.format(self.psrunner.res_dir), 'w') + '{}/subunit_stream'.format(self.psrunner.res_dir), 'wb') self.assertEqual(self.psrunner.is_successful(), result) args[0].assert_called_once_with(self.psrunner.suite) args[1].assert_not_called() @@ -115,7 +115,7 @@ class SuiteTesting(unittest.TestCase): with mock.patch('six.moves.builtins.open', mock.mock_open()) as m_open: self.assertEqual(self.psrunner.run(name=name), status) m_open.assert_called_once_with( - '{}/subunit_stream'.format(self.psrunner.res_dir), 'w') + '{}/subunit_stream'.format(self.psrunner.res_dir), 'wb') self.assertEqual(self.psrunner.is_successful(), result) args[0].assert_called_once_with(self.psrunner.suite) args[1].assert_called_once_with() -- cgit 1.2.3-korg