-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Python 3 testcases [CLOUDDST-27]
After the automatically detected problems were fixed, the following issues had to be resolved to ensure that the whole test suite passes in Python 3: - in testcase 'test_get_state_with_error_other_than_enoent', '__builtin__' was changed to 'six.moves.builtins' because the built-in library was renamed in Python 3. Also, the testcase itself had been broken because it had raised an IOError due to an incorrect setup (file was assigned as a directory) and not because of the patched 'open' function. It was fixed despite incidentally fulfilling its desired function in order to prevent user confusion. - In Python 3, output for invoked bash commands is a bytes type, which can cause many issues because the code expects to work with a string. Adding the 'universal_newlines' forces the output to be returned as a string. Also, print statements were changed to logger messages.
- Loading branch information
Showing
4 changed files
with
46 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.