diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-05-07 10:42:23 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-05-07 14:44:14 +0200 |
commit | 6f8aa2785e0239dbed22fcb4d093a5bc110bcc3c (patch) | |
tree | a1861e9ba8f43f1e0d0e8e506c9b70041a2c2456 /xtesting/tests/unit | |
parent | f5d73689bdd4e9dbff98c04e190023b7f66ed7c9 (diff) |
Update to Python3
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 <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/tests/unit')
-rw-r--r-- | xtesting/tests/unit/core/test_unit.py | 6 |
1 files changed, 3 insertions, 3 deletions
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() |